Repository navigation
feat(kong-harnesses): register the sign-in client [2.4] - #8217
Conversation
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
✅ KSAI Review: Finished Run report (federated) · 2 paid runs · $0.2801 total
Reviewing cost $0.2801; the |
There was a problem hiding this comment.
| Check | Result |
|---|---|
| Scope | Both frozen files at the pinned head: the new reference page app/kong-harnesses/identity-provider.md and the added link in app/_includes/prereqs/auth/oidc/okta-kong-harnesses.md. |
| Mandate | Adopted default-code-review: attacked every setting, default, flag and behavior claim on the added lines and checked each against the kong-harnesses help includes, the sibling how-to and the reference pages; applied the repo rules to both files. |
| Findings | 2 Low |
| Findings audit | Independent audit completed: 2 kept, 0 removed, 0 with insufficient evidence, 0 added. |
Both candidate findings survive scrutiny. Each is Low on an added line, each names a concrete reader consequence, and each carries a complete replacement: an invented client name that no other page or CLI value uses, and a none row that asks for a gateway API scope the page never defines.
No new defect is added. Every other added value, default, flag and range matches in-repo evidence: the callback, the four default scopes, the three audience parameters, --public-client-evidence deployment, the 360 to 86400 second range, and the same audience on both sides.
Claims that rest on the kong-harnesses binary rather than this repository, such as the --redirect-uri rules, the logout revocation and the discovery checks, cannot be verified here; none was decisive, and none was reported.
The overload, no-copy-code, related-resources, ui-inventory and prose rules do not fire on the added lines: seven H2s, no output-only block, no self-link or duplicate, no UI inventory.
Playbooks in this review: review-dedupe 2.1.0.
|
The page doesn't say whether Microsoft Entra ID shows its consent screen at each sign-in. kong-harnesses always sends |
c5a09ac to
c754b0f
Compare
juliamrch
left a comment
There was a problem hiding this comment.
Left a couple of comments based on my tests. So far,LGTM
…vider [2.4] Add a reference page with the client settings that an OIDC identity provider needs for kong-harnesses: the public client, the grant types, PKCE, the exact callback, offline access, the gateway audience, the discovery checks and the access token lifetime. Link it from the Okta prereq. Signed-off-by: Bart Smykla <bartek@smykla.com>
Match the page to the CLI rules: the callback form, the scopes that a custom list replaces, the discovery fields that are always checked, the supported ID token algorithms and the expires_in lifetime range. Separate the audience that the profile requests from the aud value that config.audience_required checks, add the Keycloak mapper and the Auth0 offline access setting, link logout for revocation, and drop the Hermes note. Add the page to the kong-harnesses index. Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
A sign-in listens on the callback port, so two profiles that share a port can't sign in at the same time, even with different paths. Add the port and trailing slash rules, and the Entra ID loopback rules. Add the Entra ID tenant issuer, audience and API permission, and the Keycloak default client scope with --audience-parameter none. Say that login repeats the discovery checks, that the client must sign ID tokens with an accepted algorithm, and how to pick the token lifetime limit. Signed-off-by: Bart Smykla <bartek@smykla.com>
Give the Auth0, Keycloak, Entra ID and PingFederate settings that put the gateway audience in the access token, at sign-in and at renewal. Use the dedicated Keycloak client scope, because a token response with an extra scope fails the sign-in, and state that scope rule. Mark the default callback, the query response mode, the consent prompt, the listener addresses and the discovery recheck at sign-in. Fix the audience_required list, the Entra ID token versions, the lifetime limit above 24 hours and the profile create placeholders. Signed-off-by: Bart Smykla <bartek@smykla.com>
Add the Bearer token type row, the RSA and ECDSA ID token algorithms and the scope rule at renewal. Renewal needs more than 6 minutes left after it saves the new token, so ask for a lifetime above 6 minutes. Correct the Entra ID v1.0 aud, the PingFederate access token manager, the Auth0 API identifier and the Keycloak offline_access setup. Note the consent prompt that providers can skip, the localhost and 127.0.0.1 port conflict with its error text, and a PKCE check when discovery omits it. Link the login, setup, profile get and doctor pages. Signed-off-by: Bart Smykla <bartek@smykla.com>
Renewal checks the scopes against the last accepted list, and the CLI sends the audience only in the browser authorization request. Auth0 asks for confirmation at each sign-in with a loopback callback. Order the public-client evidence steps around a test client, merge the discovery rules into one list, show the Entra ID manifest entry for a 127.0.0.1 callback, put the port conflict message in an output block and name the other providers that the page covers. Signed-off-by: Bart Smykla <bartek@smykla.com>
Renewal needs more than 6 minutes left on the new access token, so an Okta rule with a lifetime of exactly 6 minutes fails. Use the same range as the identity provider reference page. Signed-off-by: Bart Smykla <bartek@smykla.com>
Use publicClient.redirectUris from the Microsoft Graph app manifest for a 127.0.0.1 callback, and link config.audience_required to the Authorization section of the OpenID Connect page, whose anchor renders without scripts. Add the revocation_endpoint https check, the PingFederate signing and at+jwt settings, the Entra ID audience_required value, the renewal margin and setup next to login. Soften the Auth0 prompt, clarify the scope list at renewal and cut repeats to keep the page under the overload limit. Signed-off-by: Bart Smykla <bartek@smykla.com>
Add the authorization_response_iss_parameter_supported check, the fixed profile port next to a provider that accepts any loopback port, and the Entra ID consent screen at each sign-in. Match the Auth0 prompt to the Allow Skipping User Consent setting of the API. Say that only Okta is tested, word the callback path rule as the CLI checks it, and cut repeats to keep the page under the overload limit. Signed-off-by: Bart Smykla <bartek@smykla.com>
Add Auth0 refresh token rotation with reuse detection, the endpoint rule without user information or a fragment, and the callback without iss when discovery doesn't require it. Make the gateway refusal depend on config.audience_required, and keep existing Entra ID redirect URIs. Describe the callback-in-use error in place of a quoted internal message, drop the Entra ID consent claim that Microsoft sources don't settle, give the full Keycloak dedicated scope reason and link the command pages. Signed-off-by: Bart Smykla <bartek@smykla.com>
Say that config.audience_claim defaults to aud, refuse an empty or repeated scope value, and give the canonical https endpoint rule without port 443 or dot segments. Add user information to the callback rule. Name the Auth0 Refresh Token Rotation setting, which also detects reuse, and the Keycloak Refresh Token Max Reuse value. Cut repeats to keep the page under the overload limit. Signed-off-by: Bart Smykla <bartek@smykla.com>
The CLI now uses one lifetime rule at sign-in and renewal: at least 365 seconds, and a flag range from 365 to 86400. It accepts a percent-encoded scope or the last path segment of a requested URI scope, checks iss when the callback has one, and reports a reserved Windows port as in use. Give the Keycloak shared scope option with Include in token scope off, and cut repeats to keep the page under the overload limit. Signed-off-by: Bart Smykla <bartek@smykla.com>
Split the signing key checks into the keys that kong-harnesses skips and the keys that make the sign-in fail, as the CLI does. Say how a renewal reads a response with a status other than 2xx. Add the host rules for percent encoding and the canonical IPv4 form. Add the Entra ID steps that give the client the delegated permission of the gateway API. Link the provider settings and defaults to the provider docs, and drop the Keycloak access token default that no provider page states. Negate the verb in place of a trailing "no". Signed-off-by: Bart Smykla <bartek@smykla.com>
Give the signing key checks in the order of the CLI: the kty and kid rules apply to every key, and the other rules apply only to a key that the CLI doesn't skip. Say that exactly one usable key must match the ID token. Add the profile name, gateway origin and discovery URL rules, the exact callback host and path, the fixed message for a provider error, the proxy condition of the renewal connection check, and the system trust store for the identity provider certificate. Give the Keycloak lifetime range and the scopes that Keycloak names in the token response. Say that a profile that a client still uses can't change, and how to release it. Keep the discovery and invalid_grant rules on the checks page only. Signed-off-by: Bart Smykla <bartek@smykla.com>
Say that a key can leave out alg, use and key_ops, and start each key step with its condition. Give the key type and curve for each ID token algorithm. Make the invalid_grant rule need a complete JSON body, and say that the CLI tries to remove the saved sign-in. Say that a renewal checks the 360 seconds again after it saves the new refresh token, that only a saved endpoint must match the discovery document, and how to release a profile in one client. Give the Entra ID ceiling for the default lifetimes and for a lifetime policy. Remove a meta sentence, a repeated discovery URL rule, a repeated audience check, the Okta audience example and the Entra ID plain PKCE note. Signed-off-by: Bart Smykla <bartek@smykla.com>
Give the allowed scopes at sign-in and at renewal, and the scope match steps in the order of the CLI. Make the invalid_grant rule need a JSON body of at most 65,536 bytes. Say what the 2-minute sign-in limit covers, what the 5-second renewal margin is, and that any program on the callback port stops the sign-in. For Keycloak, keep Include in token scope on only for the scopes that the profile requests, allow persistent refresh tokens, keep Add to ID token off in the Audience mapper, and drop the unsourced resource claim. Say that Entra ID matches the port of a 127.0.0.1 callback. Keep the saved endpoint rule on the checks page only, and link --redirect-uri to the callback rules. Signed-off-by: Bart Smykla <bartek@smykla.com>
Say that the 365-second minimum has a 5-second margin and that the token must still have 360 seconds left after the renewal saves the refresh token. Say that the 2-minute limit is the wait for the browser callback. For Keycloak, say that a --scope list replaces the defaults and must keep profile and email, that the CLI saves the refresh token of each renewal, why the profile uses --audience-parameter none, and that the CLI refuses an ID token with another aud value. Make each 127.0.0.1 port of an Entra ID callback its own redirect URI in the same app registration. Signed-off-by: Bart Smykla <bartek@smykla.com>
Say that --audience-parameter none uses the Audience mapper as the source of the gateway audience, because Keycloak can read the resource parameter when its Resource Indicators feature is on. Say that Keycloak sends a new refresh token in each renewal response with rotation off. Keep only the Keycloak result of a shorter --scope list, and state the 365-second minimum and its 5-second renewal margin once. Signed-off-by: Bart Smykla <bartek@smykla.com>
Say that --audience-parameter none stops the sign-in request from sending resource, so the Audience mapper is the only source of the gateway audience. Say that Keycloak sends a new refresh token only when Use Refresh Tokens is on. Fit the Include in token scope step to each scope that the list leaves out, and say that the 360 seconds apply after the renewed sign-in is saved. Signed-off-by: Bart Smykla <bartek@smykla.com>
Move the token response scope matching, allowed-list tracking and required-scope rules from identity-provider.md into identity-provider/checks.md under Token responses, merging them with the existing scope format bullet without duplication, and link there from identity-provider.md. Signed-off-by: Bart Smykla <bartek@smykla.com>
Replace the repeated profile creation command and security identity rules in identity-provider.md with links to Profile creation on profiles-for-administrators.md, the profile create CLI reference and Security identity on profile-file.md. Signed-off-by: Bart Smykla <bartek@smykla.com>
Replace the repeated profile field rules under Profile values in identity-provider/checks.md with links to Sign-in fields and Top-level fields on profile-file.md while keeping the Profile values heading and canonical URL cross-references, move discovery_url into the URLs list, tighten the merged Token responses wording and point the scope and audience rule links in identity-provider.md directly to Sign-in fields. Signed-off-by: Bart Smykla <bartek@smykla.com>
Remove the repeated refresh-token storage sentence and generic lifetime flag rule from the Keycloak section of identity-provider/providers.md, and link to Token responses, ID token and Access token lifetime instead. Signed-off-by: Bart Smykla <bartek@smykla.com>
Split the `--gateway-origin` rule in `identity-provider/checks.md` into two sentences so it states that the value follows the URL rules without a path or query and that the port rule excludes `80` in place of `443` for loopback `http`. Split the Keycloak `Scopes` bullet in `identity-provider/providers.md` so the link to `Token responses` is an attribution clause rather than the subject of the sentence. Signed-off-by: Bart Smykla <bartek@smykla.com>
Limit the Keycloak "Include in token scope" turn-off step in `identity-provider/providers.md` to default client scopes that the profile doesn't request, and state that a token response with `scope` must keep every\ncustom scope that the profile requests.\n\nReword the loopback `http` gateway origin port rule in\n`identity-provider/checks.md` to state directly that the URL must not name port\n`80`, in the same way that an `https` URL must not name port `443`. Signed-off-by: Bart Smykla <bartek@smykla.com>
Advise unlinking unneeded default client scopes from the kong-harnesses client in the Client scopes tab rather than turning off the shared Include in token scope switch, because changing that shared setting alters the scope claim for every other client linked to that scope. Limit turning off Include in token scope on a shared scope to cases where the other clients linked to it need that change too, both under Scopes and under Audience, and direct readers to move client-specific mappers or role mappings to the dedicated client scope otherwise. Remove the repeated sentence about turning off Include in token scope when --scope omits profile or email. Signed-off-by: Bart Smykla <bartek@smykla.com>
The Keycloak scope steps told readers to unlink a shared scope and then offered to turn off Include in token scope on it, which contradicts. List the choices first, in the order to apply them: unlink a scope that this client does not need, keep the link and turn the switch off only when every other linked client needs that, or move the mappers to the dedicated client scope. A scope with role scope mappings applies only to users with one of its roles, and the dedicated client scope skips that check, so for such a scope copy it, turn the switch off on the copy and link the copy only to this client. Say that openid is a protocol value with no client scope to link, and that the switch must stay on only for the custom scopes that the profile requests. Signed-off-by: Bart Smykla <bartek@smykla.com>
The callback section mixed the Windows reserved port case and its netsh commands into the text for every OS. Move the conflict text into macOS and Linux, and Windows tabs, so each reader sees only the steps for their OS. Signed-off-by: Bart Smykla <bartek@smykla.com>
Keycloak applies a client scope with role scope mappings only for a user who has one of its roles. For any other user it leaves the scope out of the token response, so a requested custom scope goes missing and the sign-in fails. Say this, link the Keycloak section, and tell administrators to check the roles of each user who signs in. Also say how a requested scope is linked: as a default client scope, or as an optional client scope that the profile requests. Signed-off-by: Bart Smykla <bartek@smykla.com>
The Keycloak section said that the token response names each default client scope with Include in token scope on. A default client scope with role scope mappings is left out for a user who has none of its roles, so say so and link the Keycloak section that describes it. Signed-off-by: Bart Smykla <bartek@smykla.com>
Correct the Auth0 consent setting, drop the Entra ID public client flows toggle that the sign-in doesn't use, and add the PingFederate issuer claim and published signing key that the gateway needs. Add the Auth0 per-app grant and the Keycloak rotation client policy. Add the issuer row to the client settings, put the Keycloak scope choices in a table, split the Windows port commands into two blocks, and cut checks that aren't about the identity provider. Signed-off-by: Bart Smykla <bartek@smykla.com>
Say that --audience is needed with every audience parameter, name the Auth0 and Keycloak consent settings, restore the first Keycloak scope row to cover a scope with mappers only, and replace unclear phrases. Signed-off-by: Bart Smykla <bartek@smykla.com>
Define the PingFederate scopes and select the JWT instance in the OIDC policy too, say that the Entra ID gateway API must expose a delegated scope, scope the plain PKCE switch to the server, and say which refresh token refusal needs a new sign-in. Signed-off-by: Bart Smykla <bartek@smykla.com>
Link the Keycloak PKCE section, move the timeouts and audience mapper links next to the steps that they document, and name the access token lifetime in the first sentence of its section. Signed-off-by: Bart Smykla <bartek@smykla.com>
…tles Name the saved refresh token in the renewal cross-reference, list offline_access with the PingFederate scopes, and use the exact title of the linked PingFederate policy page. Signed-off-by: Bart Smykla <bartek@smykla.com>
dcc8bd2 to
0990d8d
Compare
Description
An admin who sets up kong-harnesses with an identity provider other than Okta has no page that says what the sign-in client needs. The Okta prereq of the Claude Code how-to walks through one provider, but it doesn't say which of its settings every provider needs, or which profile flag matches each one. A wrong callback, a missing refresh token or a token without the gateway audience fails at sign-in or at the gateway, and kong-harnesses can't warn about it earlier.
This PR adds the reference page "Register kong-harnesses in your identity provider" at
/kong-harnesses/identity-provider/, with the settings that every provider needs:coderesponse type in the query, theBearertoken type, PKCE withS256, an RSA or ECDSA ID token signature, the callback, the scopes, the audience and the access token lifetime, each with itsprofile createflag.--redirect-uriaccepts, the consent prompt, the 2-minute wait for the browser callback, and one sign-in at a time per callback port.offline_accessand the refresh token grant are required, how a custom--scopelist replaces the defaults, rotated and refused refresh tokens, and a link tologoutfor revocation.audvalue thatconfig.audience_requiredchecks compared with the--audiencevalue of the profile, the three--audience-parametervalues, and a check of tokens from a sign-in and from a renewal.--public-client-evidence deployment.expires_inrange that kong-harnesses accepts,--max-token-lifetime-seconds, and which changed profile values change its security identity.A second reference page, "Identity provider settings for kong-harnesses" at
/kong-harnesses/identity-provider/providers/, has one section each for Auth0, Keycloak, Microsoft Entra ID and PingFederate: the issuer, the public client and PKCE settings, consent, scopes, offline access and refresh token rotation, the gateway audience, loopback callbacks, the ID token policy and token version where they apply, and the default access token lifetimes. Each setting links to the documentation of its provider, and the page says that they aren't tested.A third reference page, "Identity provider checks in kong-harnesses" at
/kong-harnesses/identity-provider/checks/, lists the checks that an admin can hit through the provider settings or the profile flags: the URLs, the callback request, the HTTP responses, the discovery document, the signing keys, the token responses and the ID token, so an admin can find why a provider value is refused.The Okta prereq include links to the new page, and its lifetime check now asks for 7 to 60 minutes, the range of the new page in whole minutes. The kong-harnesses index lists the three pages.
Merge this after the kong-harnesses release that the pages describe, the next release from the CLI main branch. The generated
profile createhelp include still says 360 to 86400 seconds, and it updates when the help syncs from that release.Merge this after #8229 and #8226 too. The pages link to
/kong-harnesses/profile-file/and/kong-harnesses/profiles-for-administrators/, which those PRs add, so thebuildlink check fails until they're on the release branch.Testing
Vale passes. Each value, flag and behavior was checked against the kong-harnesses help and code: the default callback and scopes, the
--redirect-urirules, the callback listener, the absolute URI rule of--audience, theresource,audienceandnoneaudience parameters, the token type, the token response scope checks at sign-in and at renewal, the discovery, signing key and ID token checks, the HTTP response limits, theinvalid_grantrefusal, and the 365 to 86400 second lifetime range. The provider settings were checked against the linked provider documentation.Preview Links
New pages:
https://deploy-preview-8217--kongdeveloper.netlify.app/kong-harnesses/identity-provider/
https://deploy-preview-8217--kongdeveloper.netlify.app/kong-harnesses/identity-provider/providers/
https://deploy-preview-8217--kongdeveloper.netlify.app/kong-harnesses/identity-provider/checks/
Updated landing page:
https://deploy-preview-8217--kongdeveloper.netlify.app/kong-harnesses/
Checklist