zitadel/internal/api/oidc/integration_test
Livio Spring c347e75485
fix: ignore projectID and origin check for service accounts (#8704)
# Which Problems Are Solved

Calls with tokens issued through JWT Profile or Client Credentials
Grants were no longer possible and threw a "could not read projectid by
clientid (AUTH-GHpw2)" error.
ZITADEL checks the allowed origins of an application and load its
projectID into the context on any API call.
Tokens from service accounts did not contain any clientID and therefore
never did that check.
But due to a change in https://github.com/zitadel/zitadel/pull/8580,
were the service user id was set as client_id in the OIDC session to fix
the introspection response
(https://github.com/zitadel/zitadel/issues/8590).

# How the Problems Are Solved

- Check if the project and origin were retrieved and only then check the
origins

# Additional Changes

None.

# Additional Context

- closes https://github.com/zitadel/zitadel/issues/8676
- relates to https://github.com/zitadel/zitadel/pull/8580 (released on
2.62.0)
- relates to https://github.com/zitadel/zitadel/issues/8590
2024-10-01 16:38:28 +02:00
..
auth_request_test.go chore(tests): use a coverage server binary (#8407) 2024-09-06 14:47:57 +02:00
client_test.go fix: correctly check app state on authentication (#8630) 2024-09-17 11:34:14 +00:00
keys_test.go chore(tests): use a coverage server binary (#8407) 2024-09-06 14:47:57 +02:00
oidc_test.go chore(tests): use a coverage server binary (#8407) 2024-09-06 14:47:57 +02:00
server_test.go chore(tests): use a coverage server binary (#8407) 2024-09-06 14:47:57 +02:00
token_client_credentials_test.go fix: ignore projectID and origin check for service accounts (#8704) 2024-10-01 16:38:28 +02:00
token_exchange_test.go chore(tests): use a coverage server binary (#8407) 2024-09-06 14:47:57 +02:00
token_jwt_profile_test.go fix: ignore projectID and origin check for service accounts (#8704) 2024-10-01 16:38:28 +02:00
userinfo_test.go chore(tests): use a coverage server binary (#8407) 2024-09-06 14:47:57 +02:00