Generic Identity And Access Management
SunbirdRC was tightly coupled with keycloak for authentication & authorization of users. Currently, SunbirdRC is updated to support any identity layer (oauth2 compliant) for IAM
Last updated
Was this helpful?
SunbirdRC was tightly coupled with keycloak for authentication & authorization of users. Currently, SunbirdRC is updated to support any identity layer (oauth2 compliant) for IAM
Last updated
Was this helpful?
Generic IAM is part of release-1.0.0
SunbirdRC requires an IAM platform for mainly two purposes.
authN & authZ of users to enable trust between the user and the entity.
to manage user accounts for the entities created
Configure the below environment variables for the registry core service
oauth2_resource_uri
should be configured with the domain url of the IAM service
Example value
Keycloak: ``
Auth0: `/` (API Domain)
Fusionauth: `http://domain/` (The value of the issuer configured in the tenant page)
oauth2_resource_email_path
should be configured with the path to be used for fetching email id from the token
oauth2_resource_consent_path
(OPTIONAL) should be configured with the path to be used for fetching consent fields from the token
oauth2_resource_roles_path
should be configured with the path to be used for fetching roles from the token
oauth2_resource_entity_path
(OPTIONAL) should be configured with the path to be used for fetching entities from the token
Currently, one needs to write a custom implementation to support creating users in the respective IAM platforms. SunbirdRC provided two ways to configure it:
The module needs to be added to the core registry and you need to build a custom docker image and use it in your application.
Steps to create a submodule in SunbirdRC:
Update identity_provider
env with the provider package name\
Instead of creating a module in the core service, you can create an external/custom service which exposes an API to create users in your IAM platform.
You need to configure the below env with respective values
Currently, SunbirdRC is shipped with two submodules (Keycloak & auth0) to integrate with IAM platform. . If you need support for any other platform then you would need to create a module in a similar fashion. You need to configure the below env with respective values
Create a in java/middleware/registry-middleware
Implement this provider , which returns the IdentityManager which handles user creation functionality. (Example )
The IdentityManager should implement the , which handles user creation and returns the user id. (Example: )
A Service Provider is configured and identified through a provider configuration file which we put in the resource directory META-INF/services. The file name is the fully-qualified name of the SPI and its content is the fully-qualified name of the SPI implementation. (Example: )
The API should follow this API spec:
A sample service to create a user in FusionAuth is provided.