8000 KEYCLOAK-12137 OpenID Connect Client Initiated Backchannel Authentication (CIBA) by tnorimat · Pull Request #7679 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

KEYCLOAK-12137 OpenID Connect Client Initiated Backchannel Authentication (CIBA) - #7679

Merged
mposolda merged 31 commits into
keycloak:masterfrom
Hitachi:KEYCLOAK-12137
Apr 29, 2021
Merged

mposolda merged 31 commits into
keycloak:masterfrom
Hitachi:KEYCLOAK-12137

Conversation

@tnorimat
Copy link
Copy Markdown
Contributor

This PR is for KEYCLOAK-12137 OpenID Connect Client Initiated Backchannel Authentication (CIBA), also is the part of the project FAPI-CIBA(poll mode) of FAPI-SIG activity.

Generally speaking, the aim of this PR is to support CIBA Flow defined in the design document.

However, this PR does not support Financial-grade API: Client Initiated Backchannel Authentication Profile
(FAPI-CIBA)
feature. As mentioned in the 8th meeting of FAPI-SIG, I will send PRs for FAPI-CIBA features consecutively after this PR supporting pure CIBA being merged.

This PR is still huge so that I will add detailed comments on the commits to help the reviewer grasp them.

This PR has been written with the contribution by @andriimurashkin as FAPI-SIG activities..

@tnorimat
Copy link
Copy Markdown
Contributor Author

@mposolda As mentioned in the 8th meeting of FAPI-SIG, I sent at first the PR for the pure CIBA support. This PR is still huge so that I will add detailed comments on the commits to help the reviewer grasp them.

@tnorimat
Copy link
Copy Markdown
Contributor Author

In these comments here, the following external resources are referred.

I've added and referred this implementation practical guide because it seems to be difficult to describe this PR by only these comments here.

@tnorimat
Copy link
Copy Markdown
Contributor Author

Set as Preview Feature

This PR sets the CIBA support as the preview feature. The following two points check whether the CIBA support is activated or not and refuse the request from the client as CD(Consumption Device) if the CIBA support is not activated.

  • BackchannelAuthenticationEndpoint.processGrantRequest()

    This point receives the CIBA's backchannel authentication request from the CD.

  • TokenEndpoint.cibaGrant()

    This point receives the CIBA's token request from the CD.

Related codes

  • common/src/main/java/org/keycloak/common/Profile.java

    It defines CIBA support as Preview.

  • common/src/test/java/org/keycloak/common/ProfileTest.java

    It adds the unit tests.

  • services/src/main/java/org/keycloak/protocol/ciba/endpoints/BackchannelAuthenticationEndpoint.java

    It rejects the backchannel authentication request if the CIBA support is deactivated.

  • services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java

    It rejects the token request if the CIBA support is deactivated.

Corresponding description on the design document

Not mentioned.

Corresponding description on the implementation practical guide

Not mentioned.

@tnorimat
Copy link
Copy Markdown
Contributor Author

Backchannel Authentication Endpoint

This PR defines the backchannel authentication endpoint as follows.

http(s)://{host}:{port}/auth/realms/{realm}/protocol/openid-connect/backchannelAuthn

This endpoint's entry point is defined in
keycloak-services : OIDCLoginProtocolService.backchannelAuthn()

This endpoint's url can be retrieved by
keycloak-services : OIDCLoginProtocolService.backchannelAuthnUrl()

Related codes

  • services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolService.java

    It defines the entry point of the backchannel authentication endpoint.

  • services/src/main/java/org/keycloak/protocol/ciba/endpoints/BackchannelAuthenticationEndpoint.java

    It implements the logic on the backchannel authentication endpoint.

Corresponding description on the design document

Specifications - Inside CIBA Protocol - Backchannel Authentication Endpoint

Corresponding description on the implementation practical guide

page 19, KE-1: Backchannel Authentication Endpoint

@tnorimat
Copy link
Copy Markdown
Contributor Author

OpenID Provider Metadata

This PR supports the following two REQUIRED OpenID Provider Metadata.

  • backchannel_token_delivery_modes_supported

    Indicating which token delivery modes are supported. This PR only supports the poll mode so that only ["poll"] is returned.

  • backchannel_authentication_endpoint

    Indicating the backchannel authentication endpoint. The following is returned.

    "http(s)://{host}:{port}/auth/realms/{realm}/protocol/openid-connect/backchannelAuthn"

Related codes

  • core/src/main/java/org/keycloak/protocol/oidc/representations/OIDCConfigurationRepresentation.java

    It defines keycloak's OIDC server metadata external representation.

  • services/src/main/java/org/keycloak/protocol/oidc/OIDCWellKnownProvider.java

    It defines the server metadata returned from /.well-known/openid-configuration.

  • testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/oidc/OIDCWellKnownProviderTest.java

    It tests the server metadata retrieved from /.well-known/openid-configuration.

Corresponding description on the design document

Design and Implementation - Server Metadata

Corresponding description on the implementation practical guide

Not mentioned.

@tnorimat
Copy link
Copy Markdown
Contributor Author

Configuration Items

The followings can be configured.

  • Backchannel Token Delivery Mode

    This PR only supports the poll mode so that only "poll" can be set.

  • Expires in

    The expiration time of the "auth_req_id" in seconds since the backchannel authentication request was received.

  • Interval

    The minimum amount of time in seconds that the CD needs to wait between polling requests to the token endpoint.

These configuration items can be set per realm. They can be realized as CIBA Policy. On Admin Console, this CIBA Policy is shown on Authentication tab.

The model of this CIBA Policy is defined by
keycloak-server-spi : CIBAPolicy

These configuration items are stored as realm attributes.

Related codes

  • core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java

    It includes CIBA Policy as a realm external representation.

  • model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/RealmAdapter.java

    It includes CIBA Policy as a realm model adapter on infinispan cache.

  • model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/entities/CachedRealm.java

    It includes CIBA Policy as a realm model entity on infinispan cache.

  • model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java

    It includes CIBA Policy as a realm model adapter on JPA.

  • model/jpa/src/main/java/org/keycloak/models/jpa/entities/RealmAttributes.java

    It includes keys for storing CIBA Policy as realm attributes on JPA.

  • server-spi-private/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java

    It includes CIBA Policy for converting an internal realm model to an external realm representation.

  • server-spi-private/src/main/java/org/keycloak/models/utils/RepresentationToModel.java

    It includes CIBA Policy for converting an external realm representation to an internal realm model

  • server-spi/src/main/java/org/keycloak/models/CIBAPolicy.java

    It defines CIBA Policy as an internal realm model.

  • server-spi/src/main/java/org/keycloak/models/RealmModel.java

    It includes CIBA Policy as an internal realm model.

  • services/src/main/java/org/keycloak/protocol/ciba/endpoints/BackchannelAuthenticationEndpoint.java

    On processing the backchannel authentication request, it refers to the settings of CIBA Policy.

  • themes/src/main/resources/theme/base/admin/resources/js/app.js

    It routes the URL of CIBA Policy UI to its control.

  • themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js

    It defines the controller of CIBA Policy UI.

  • themes/src/main/resources/theme/base/admin/resources/partials/ciba-policy.html

    It defines the template of CIBA Policy UI.

  • themes/src/main/resources/theme/base/admin/resources/templates/kc-tabs-authentication.html

    It adds the link to CIBA Policy UI on Authentication tab.

Corresponding description on the design document

Specifications - Settings - CIBA Policy

Corresponding description on the implementation practical guide

Not mentioned.

@tnorimat
Copy link
Copy Markdown
Contributor Author

Authentication Flow

Like Browser Flow and Direct Grant Flow, this PR introduced dedicated authentication flow called "CIBA Flow" because the CIBA's authentication flow does not fit any other existing flow in keycloak.

Like Browser Flow and Direct Grant Flow, CIBA Flow can be overridden by the flow specified per client.

This PR provides the default authentication flow.

Authenticator

Like other flows, CIBA flow can include executors and sub flows. This PR provides the default authenticator CIBADecoupledAuthenticator which retrieves the information on the user authenticated by the decoupled authentication server, confirm that such the user has been registered on the keycloak, and set up the user session and client session.

When an authentication flow for CIBA is instantiated

It is instantiated when the keycloak receives the result of AuthN(Authentication) and AuthZ(Authorization) by AD(Authentication Device) from the decoupled authentication server and verify this result.

Related codes

  • core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java

    It includes CIBA Flow as a realm external representation.

  • model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/RealmAdapter.java

    It includes CIBA Flow as a realm model adapter on infinispan cache.

  • model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/entities/CachedRealm.java

    It includes CIBA Flow as a realm model entity on infinispan cache.

  • model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java

    It includes CIBA Flow as a realm model adapter on JPA.

  • model/jpa/src/main/java/org/keycloak/models/jpa/entities/RealmAttributes.java

    It includes keys for storing CIBA Flow ID as realm attributes on JPA.

  • server-spi-private/src/main/java/org/keycloak/models/utils/AuthenticationFlowResolver.java

    It allows CIBA Flow to be overriden by the one specified per client.

  • server-spi-private/src/main/java/org/keycloak/models/utils/DefaultAuthenticationFlows.java

    It sets up the default CIBA Flow.

  • server-spi-private/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java

    It includes CIBA Flow for converting an internal realm model to an external realm representation.

  • server-spi-private/src/main/java/org/keycloak/models/utils/RepresentationToModel.java

    It includes CIBA Flow for converting an external realm representation to an internal realm model

  • server-spi/src/main/java/org/keycloak/models/AuthenticationFlowBindings.java

    It includes keys for retrieving CIBA Flow set per client.

  • server-spi/src/main/java/org/keycloak/models/RealmModel.java

    It includes CIBA Flow as an internal realm model.

  • services/src/main/java/org/keycloak/authentication/authenticators/ciba/CIBADecoupledAuthenticator.java

    It is a default authenticator for the authentication flow for CIBA.

  • services/src/main/java/org/keycloak/authentication/authenticators/ciba/CIBADecoupledAuthenticatorFactory.java

    It is the factory class for CIBADecoupledAuthenticator.

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DecoupledAuthenticationProviderBase.java

    It receives the result of AuthN and AuthZ by AD from the decoupled authentication server and verify this result. When this verification succeeds, it instantiates the authentication flow for CIBA and processes it.

  • testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/authentication/InitialFlowsTest.java

    It tests whether the default authentication flow and authenticator for CIBA are registered properly.

  • testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/authentication/ProvidersTest.java

    It tests whether the authenticator for CIBA is loaded properly.

Corresponding description on the design document

Design and Implementation - Authentication Flow

Corresponding description on the implementation practical guide

page 47, CIBA Flow : Authentication Flow/Execution

@tnorimat
Copy link
Copy Markdown
Contributor Author

Outside CIBA Protocol : AuthN & AuthZ Delegation Request/Delegation Request Accepted Response

The process after receiving the backchannel authentication has been implemented as the provider, namely sending AuthN & AuthZ Delegation Request to the decoupled authentication server and receiving the corresponding response.

Related codes

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DecoupledAuthenticationProvider.java

It defines the interface for sending AuthN & AuthZ Delegation Request to the decoupled authentication server and receiving its response.

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DecoupledAuthenticationProviderFactory.java

It is the factory class for DecoupledAuthenticationProvider.

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DecoupledAuthenticationSpi.java

It defines SPI for DecoupledAuthenticationProvider and DecoupledAuthenticationProviderFactory.

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DecoupledAuthenticationProviderBase.java

It defines the implementation for DelegateDecoupledAuthenticationProvider as an abstract class.

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DelegateDecoupledAuthenticationProvider.java

It defines the actual implementation for DecoupledAuthenticationProvider by extending DelegateDecoupledAuthenticationProvider.

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DelegateDecoupledAuthenticationProviderFactory.java

It is the factory class for DelegateDecoupledAuthenticationProvider.

Corresponding description on the design document

Design and Implementation - From Backchannel Auth Req/Res part to AuthN/AuthZ by AD part

Corresponding description on the implementation practical guide

page 48, CIBA Flow : Providers

@tnorimat
Copy link
Copy Markdown
Contributor Author

Outside CIBA Protocol : AuthN & AuthZ Result Notification/Result Notification ACK

The process after receiving AuthN & AuthZ Result Notification from the decoupled authentication server has been implemented as the provider.

It requires a custom endpoint so that this provider realized it by implementing OIDCExtProvider. The URL of this custom endpoint can be set by wildfly's setting file (standalone.xml, etc)

Related codes

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DecoupledAuthnResultCallbackEndpointFactory.java

It is the factory class for DelegateDecoupledAuthenticationProvider.

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DelegateDecoupledAuthenticationProvider.java

It defines the actual implementation for OIDCExtProvider and implements the logic for this custom endpoint.

Corresponding description on the design document

Design and Implementation - From AuthN/AuthZ by AD part To Token Req/Res part

Corresponding description on the implementation practical guide

page 48, CIBA Flow : Providers

@tnorimat
Copy link
Copy Markdown
Contributor Author

Outside CIBA Protocol : Settings about Decoupled Authentication Server

The following items can be set by wildfly's setting file (standalone.xml, etc)

  • Provider ID for DecoupledAuthenticationProvider
  • AuthN & AuthZ Delegation Endpoint on the decoupled authentication server

Related codes

Nothing.

Corresponding description on the design document

Not mentioned.

Corresponding description on the implementation practical guide

page 53, Run with Decoupled Auth Server Reference Implementation

@tnorimat
Copy link
Copy Markdown
Contributor Author

Session Binding

One CIBA protocol flow consists of the following HTTP requests/responses.

  • Inside CIBA Protocol : Backchannel Authentication Request/Response
  • Outside CIBA Prototype Implementation : Actual End user authentication & authorization by AD
  • Inside CIBA Protocol : Token Request/Response

To bind these stateless requests/responses to identify one logical same CIBA protocol flow, use the identifier Auth Result ID.

To share this Auth Result ID between keycloak and CD, use JWE encrypted auth_req_id which includes Auth Result ID.

To share this Auth Result ID between keycloak and the decoupled authentication server, use JWE encrypted decoupled_auth_id which includes Auth Result ID.

Related codes

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DecoupledAuthenticationProviderBase.java

    It receives decoupled_auth_id from the decoupled authentication server and store the AuthN & AuthZ by AD result onto the infinispan cache with Auth Result ID as its key.

  • services/src/main/java/org/keycloak/protocol/ciba/decoupledauthn/DelegateDecoupledAuthenticationProvider.java

    On receiving the AuthN & AuthZ by AD result from the decoupled authentication server, it decrypts decoupled_auth_id to retrieve the context data for the CIBA protocol flow and verifies the AuthN & AuthZ by AD result based on them.

    On receiving the backchannel authentication request from CD, it generates decoupled_auth_id and send it to the decoupled authentication server for requesting the AuthN & AuthZ by AD.

  • services/src/main/java/org/keycloak/protocol/ciba/endpoints/BackchannelAuthenticationEndpoint.java

    On receiving the backchannel authentication request from CD, it generates auth_req_id and send it back to CD.

Corresponding description on the design document

Design and Implementation

Corresponding description on the implementation practical guide

page 45, CIBA Flow : Session Binding

@tnorimat
Copy link
Copy Markdown
Contributor Author

Protocol Flow Context

The one logical CIBA protocol flow is characterized by its context.

To idenfity this logical CIBA protocol flow and recognizes its characteristics among keycloak, CD and the decoupled authentication server, use JWT encrypted auth_req_id and decoupled_auth_id which incldes not only the flow's identifier Auth Result ID but also its context whick makes keycloak stateless about CIBA protocol flows partially.

Consindering the fact that CD sends the token request and the decoupled authentication server sends the AuthN & AuthZ by AD result to keycloak independently and asynchronously, keycloak use the infinispan distribution cache to retain this AuthN & AuthZ by AD result with Auth Result ID as its key.

Both auth_req_id and decoupled_auth_id are represented by CIBAAuthReqId and JWE encoded.

Related codes

  • core/src/main/java/org/keycloak/util/TokenUtil.java

    It provides JWE encryption/decryption for auth_req_id and decoupled_auth_id.

  • services/src/main/java/org/keycloak/protocol/ciba/CIBAAuthReqId.java

    It represents auth_red_id.

  • services/src/main/java/org/keycloak/protocol/ciba/utils/CIBAAuthReqIdParser.java

    It encodes, decodes and parse auth_req_id and decoupled_auth_id.

  • services/src/main/java/org/keycloak/protocol/ciba/utils/DecoupledAuthStatus.java

    It's values indicates the result of the AuthN & AuthZ by AD.

  • services/src/main/java/org/keycloak/protocol/ciba/utils/DecoupledAuthnResult.java

    It represents the AuthN & AuthZ by AD result.

  • services/src/main/java/org/keycloak/protocol/ciba/utils/DecoupledAuthnResultParser.java

    It persists and parses the AuthN & AuthZ by AD result on the infinispan cache.

Corresponding description on the design document

Design and Implementation - How to Implement Auth Result Cache

Design and Implementation - Interface between Inside and Outside CIBA Protocol

Corresponding description on the implementation practical guide

page 46, CIBA Flow : Context

@tnorimat
Copy link
Copy Markdown
Contributor Author

User Resolver

This PR implements the provider that converts the user representation on CD, keycloak and the decoupled authentication server.

The default implementation of this provider only support login_hint parameter. Also, this value of login_hint must be "username" or "email" attributes of the user registered on keycloak.

Related codes

  • services/src/main/java/org/keycloak/protocol/ciba/resolvers/CIBALoginUserResolver.java

    The provider interface converting the user representation on CD, keycloak and the decoupled authentication server.

  • services/src/main/java/org/keycloak/protocol/ciba/resolvers/CIBALoginUserResolverFactory.java

    The provider factory interface for CIBALoginUserResolver.

  • services/src/main/java/org/keycloak/protocol/ciba/resolvers/CIBALoginUserResolverSpi.java

    The SPI for the provider CIBALoginUserResolver and its factory CIBALoginUserResolverFactory.

  • services/src/main/java/org/keycloak/protocol/ciba/resolvers/DefaultCIBALoginUserResolver.java

    The default implementation of the provider CIBALoginUserResolver. It assumes that both CD and the decoupled authentication server represent the user by username or email in keycloak.

  • services/src/main/java/org/keycloak/protocol/ciba/resolvers/DefaultCIBALoginUserResolverFactory.java

    The default implementation of the provider factory CIBALoginUserResolverFactory.

Corresponding description on the design document

Extensibility - AuthN/AuthZ User Resolver

Corresponding description on the implementation practical guide

page 49, User Resolver

@tnorimat
Copy link
Copy Markdown
Contributor Author

Token Request Throttling

To prevent keycloak from being swamped with token requests from CD, keycloak rejects the token request arrived too much early.

In order to do so, keycloak keeps information called EarlyAccessBlocker on when each token request can be accepted.

This information is kept inside the node, not synchronized among other nodes to prevent the performance of synchronizing infinispan cache among nodes from being degraded.

This PR uses simple ConcurrentMap to store this EarlyAccessBlocker.

To prevent it to be stacked infinitely after it is expired, This PR checks whether EarlyAccessBlocker expired and removes it from ConcurrentMap if so.

Related codes

  • services/src/main/java/org/keycloak/protocol/ciba/EarlyAccessBlockerStore.java

    It stores and removes EarlyAccessBlocker.

  • services/src/main/java/org/keycloak/protocol/ciba/EarlyAccessBlockerValueEntity.java

    It represents the map entry on EarlyAccessBlockerStore.

  • services/src/main/java/org/keycloak/protocol/ciba/utils/EarlyAccessBlocker.java

    It represents the information on when each token request can be received.

  • services/src/main/java/org/keycloak/protocol/ciba/utils/EarlyAccessBlockerParser.java

    It persists and parses EarlyAccessBlocker.

Corresponding description on the design document

Design and Implementation - Token Request Throttling

Corresponding description on the implementation practical guide

page 50, Token Request Throttling

@tnorimat
Copy link
Copy Markdown
Contributor Author

Arquillian Integration Test

For testing CIBA, the decoupled authentication server is needed. This PR owes the role of this server to keycloak itself by modifying TestApplicationResourceProvider and TestingOIDCEndpointsApplicationResource.

Instead of sending AuthN & AuthZ by AD result from the decoupled authentication server to keycloak, this PR makes OAuthClient retrieves it and send it to keycloak.

For the decoupled authentication server settings, this PR modifies keycloak-server.json. In the case of auth-server-wildfly being used, this PR adds EnableCiba annotation and CibaUtils for the dynamic configuration of testing environment.

Related codes

  • testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/ciba/DecoupledAuthenticationRequest.java

It represents the AuthN & AuthZ Delegation Request from keycloak to the decoupled authentication server.

  • testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/rest/TestApplicationResourceProvider.java

It adds the temporal queue holding the AuthN & AuthZ Delegation Request to the resource that can be used on the CIBA tests.

  • testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/rest/TestApplicationResourceProviderFactory.java

It defines the provider factory for TestApplicationResourceProvider.

  • testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/rest/resource/TestingOIDCEndpointsApplicationResource.java

It adds the endpoint and its logic for receiving the AuthN & AuthZ Delegation Request.

  • testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java

It adds the dynamic configuration activation of the decoupled authentication server serttings for CIBA tests.

  • testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/annotation/EnableCiba.java

It adds the dynamic configuration for the decoupled authentication server serttings for CIBA tests.

  • testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/client/resources/TestApplicationResourceUrls.java

It adds the getter for newly introduced endpoints for receiving and retrieving the AuthN & AuthZ Delegation Request.

  • testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/client/resources/TestOIDCEndpointsApplicationResource.java

It adds interfaces for newly introduced endpoints for receiving and retrieving the AuthN & AuthZ Delegation Request.

  • testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/CibaUtils.java

It defines jboss-cli commands for the dynamic configuration for the decoupled authentication server serttings for CIBA tests.

  • testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/OAuthClient.java

It adds utility methods for handling CIBA protocol.

  • testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/client/CIBATest.java

It tests this PR's CIBA protocol support.

  • testsuite/integration-arquillian/tests/base/src/test/resources/META-INF/keycloak-server.json

It adds the static configuration for the decoupled authentication server serttings for CIBA tests.

Corresponding description on the design document

Not mentioned.

Corresponding description on the implementation practical guide

Not mentioned.

@tnorimat
Copy link
Copy Markdown
Contributor Author

@mposolda I've added detailed comments on the commits to help the reviewer grasp them. Hopefully you could review this PR.

@mposolda mposolda added area/oidc OpenID Connect / OAuth 2.0 — tokens, endpoints, scopes, DCR, PAR, DPoP impact/high kind/feature Categorizes a PR related to a new feature labels Jan 18, 2021
@mposolda mposolda self-assigned this Jan 18, 2021
@pedroigor pedroigor left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tnorimat It is very nice work. Mainly tests.

Please, let me know your thoughts about my initial comments. I'm still looking at it.

@pedroigor
Copy link
Copy Markdown
Contributor

@tnorimat I was able to build a simple decoupled authentication service (or an authentication channel as per specs and per suggestions here) and it worked fine.

To improve UX, maybe we should probably create a "CIBA" switch that once turned ON will automatically configure a CIBA flow and do the binding. That switch could be in "Realm Settings" (maybe we could have an "OpenID Connect" sub-section there) so that it makes it a lot easier to use the functionality.

@tnorimat
Copy link
Copy Markdown
Contributor Author

@mposolda I've updated codes incorporating your comment on #7679 (comment) , also rebased on the latest master. Could you check them?

@mposolda mposolda left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tnorimat Thanks, I am finally approving the PR

@pedroigor Do you have any more feedback for this PR?

@mposolda
Copy link
Copy Markdown
Contributor

@tnorimat @pedroigor @valb3r Merging now. Thanks everyone for the hard work on this!

@pedroigor pedroigor left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mposolda @tnorimat Thanks for your patience.

@mposolda
mposolda merged commit 65c48a4 into keycloak:master Apr 29, 2021
@tnorimat
tnorimat deleted the KEYCLOAK-12137 branch April 30, 2021 09:30
SergiusAC pushed a commit to SergiusAC/keycloak that referenced this pull request May 20, 2021
…tion (CIBA) (keycloak#7679)

* KEYCLOAK-12137 OpenID Connect Client Initiated Backchannel Authentication (CIBA)

Co-authored-by: Andrii Murashkin <amu@adorsys.com.ua>
Co-authored-by: Christophe Lannoy <c4r1570p4e@gmail.com>
Co-authored-by: Pedro Igor <pigor.craveiro@gmail.com>
Co-authored-by: mposolda <mposolda@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/oidc OpenID Connect / OAuth 2.0 — tokens, endpoints, scopes, DCR, PAR, DPoP kind/feature Categorizes a PR related to a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0