JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
If your organization uses Keycloak for Open ID Connect (OIDC) authentication, you can configure your hub (and Keycloak service) to allow Keycloak authentication for the hub.
Once this is configured, users will be able to sign in to the hub with their OIDC credentials.
These instructions were created for Keycloak v. 24.0.2.
If you are using Keycloak for single sign-on (SSO SAML) authentication, see Task: Configure Keycloak (SSO) Hub Authentication.
In this example, we will configure a Keycloak OIDC authentication service such that:
It is sufficient to authenticate as a user with the special Administrator role, which immutably has the necessary permissions. In particular, it is always sufficient to authenticate as special user Administrator.
Configuring Keycloak OIDC authentication for your CodeSonar hub is a four-part process:
| Populate Keycloak "Add Client" field... | with... |
|---|---|
| Client ID | A short identifier for the client. You may wish to choose a meaningful identifier such as csonar_hub. |
| Name | A meaningful name so that you can identify the service later. |
| Field | Value | Notes | |
|---|---|---|---|
| Standard Plug-in Configuration Fields | |||
| Priority | 10 | The Priority value controls the relative position of the sign in with Keycloak tab in the CodeSonar Sign In page. Tabs for authentication services with lower Priority values are ordered before those for services with higher priority values. The tab with the lowest Priority value is displayed by default. | |
| Usage | Global | If you are running a primary hub with satellites, authentication for the primary hub and all satellite hubs will be performed by the primary hub. If you do not have satellite hubs, this setting will have no effect. | |
| Create new user accounts automatically | selected | If the service successfully authenticates a user who does not already have a hub account, one will be automatically created. | |
| Template User (for new accounts) | alex |
Existing user alex will be
the template
user for any hub user
accounts that are automatically
created by the service.
|
|
| Auth User | see notes |
This must be a hub user account that has user
control over the designated Template User. The
authentication service will only be able to perform hub
operations that this account has permission to
perform. In general, we recommend setting as follows.
|
|
| OIDC configuration | |||
| OIDC Discovery URL | The URL from the Keycloak OpenID endpoint configuration (you recovered this in part B). | ||
| Client ID | The Client ID you set for your Keycloak client in part A. | ||
| Client Secret | see notes |
Leave empty unless you set Client
authentication to On when you created the
Keycloak client in Part A.
If Client authentication is On, enter the Client Secret for your Keycloak client. To find this in Keycloak:
|
|
| User Claim | The hub user account username
will match the Keycloak user email. Keycloak users without a configured email address will not be able to use this service for hub authentication. |
||
| Role Claim | empty | If you want to use Keycloak roles to assign CodeSonar roles to hub user accounts, contact CodeSecure support for assistance. | |
| Extra Scopes | empty | The email claim does not require any extra scopes. | |
When installation has finished, the table of current
services will update to show an entry for the new service,
including a URI labeled Your OpenID Connect server will need
our redirect_uri listed here.
Copy this URI: you will
need it in Part D.
On your CodeSonar hub:
If you need to change the configuration for the service, work through the following steps.
To report problems with this documentation, please visit https://support.codesecure.com/.