Skip to content

feat(saml): add SAML IdP admin API surface, fix missing client_id field#49

Merged
lakhansamani merged 2 commits into
mainfrom
feat/saml-idp-admin
Jul 23, 2026
Merged

feat(saml): add SAML IdP admin API surface, fix missing client_id field#49
lakhansamani merged 2 commits into
mainfrom
feat/saml-idp-admin

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

Summary

Verified this SDK against a real quay.io/authorizer/authorizer:2.4.0-rc.7 instance and closed the remaining server API coverage gap: SAML IdP admin (Authorizer acting as Identity Provider for downstream SPs) had zero methods/types.

Added, dual graphql+rest like client/trustedIssuer:

  • createSAMLServiceProvider, updateSAMLServiceProvider, deleteSAMLServiceProvider
  • samlServiceProvider, listSAMLServiceProviders
  • rotateSAMLIDPCert, retireSAMLIDPKey, listSAMLIDPKeys
  • importSAMLSPMetadata

Bug fix

Client's GraphQL fragment and TS interface were missing client_id — the schema documents it as the public OAuth identifier used at authorize/token endpoints, distinct from the internal id. It rode along untyped in REST JSON but was never fetched over GraphQL at all. Only didn't break anything today because the server currently defaults client_id to id when unset — an implementation coincidence, not a contract guarantee.

Test plan

  • tsc --noEmit, tsup build, eslint all clean
  • New samlIdp.test.ts (8 tests, mocked fetch)
  • Live smoke test against the real rc.7 image: all 9 new methods end-to-end over both graphql and rest — create org, full SP lifecycle, rotate IdP cert twice, list/retire keys, import SP metadata, delete, 404-after-delete
  • Confirmed explicitly: this SDK has no gRPC transport (browsers can't speak raw gRPC), so there's no gRPC-native S2S auth path to verify here — by design, not oversight

Verified this SDK against a real quay.io/authorizer/authorizer:2.4.0-rc.7
instance and closed the remaining server API coverage gap: SAML IdP admin
(Authorizer acting as Identity Provider for downstream SPs) had zero
methods/types. Added, dual graphql+rest like client/trustedIssuer:
createSAMLServiceProvider, updateSAMLServiceProvider,
deleteSAMLServiceProvider, samlServiceProvider, listSAMLServiceProviders,
rotateSAMLIDPCert, retireSAMLIDPKey, listSAMLIDPKeys, importSAMLSPMetadata.

Also fixed: Client's GraphQL fragment and TS interface were missing
client_id — the schema documents it as the public OAuth identifier used at
authorize/token endpoints, distinct from the internal id. It rode along
untyped in REST JSON but was never fetched over graphql at all; only
didn't break anything today because the server currently defaults
client_id to id when unset, which is an implementation coincidence, not a
contract guarantee.

Verified: tsc --noEmit, tsup build, eslint all clean. New samlIdp.test.ts
(8 tests, mocked fetch) plus a live smoke pass against the real rc.7
image exercising all 9 new methods end-to-end over both graphql and rest
(create org, full SP lifecycle, rotate IdP cert twice, list/retire keys,
import SP metadata, delete, 404-after-delete). This SDK has no gRPC
transport (browsers can't speak raw gRPC), confirmed no gRPC-native
service-to-service auth path applies here.
CI was pinned to quay.io/authorizer/authorizer:2.3.0, which predates the
schema/CLI surface this PR's new coverage (and the existing suite) needs:

- admin.test.ts's ListUsersRequest queries and newer User fields
  (has_skipped_mfa_setup_at, mfa_locked_at, enrolled_mfa_methods) don't
  exist on 2.3.0's schema, failing GraphQL validation.
- index.test.ts passes --disable-mfa, a flag that doesn't exist on the
  2.3.0 binary -- an unrecognized flag makes it print usage and exit
  immediately, so the container's port 8080 never opens and
  testcontainers' health-check waits the full 900s before timing out.

Bumped to rc.7. Verified locally: `AUTHORIZER_IMAGE=...:2.4.0-rc.7 npm
test` passes 99/99 in ~8s (vs. 900s+ timeout before).
@lakhansamani
lakhansamani merged commit c01eb99 into main Jul 23, 2026
2 checks passed
@lakhansamani
lakhansamani deleted the feat/saml-idp-admin branch July 23, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant