Keycloak Crowd User Federation


License

License

Categories

Categories

KeY Data Data Formats Formal Verification Keycloak Security
GroupId

GroupId

it.schm.keycloak
ArtifactId

ArtifactId

crowd-user-storage
Last Version

Last Version

1.0.10
Release Date

Release Date

Type

Type

jar
Description

Description

Keycloak Crowd User Federation
Keycloak Crowd User Federation
Project URL

Project URL

https://github.com/hdensity/keycloak-crowd-user-federation
Source Code Management

Source Code Management

http://github.com/hdensity/keycloak-crowd-user-federation/tree/master

Download crowd-user-storage

How to add to project

<!-- https://jarcasting.com/artifacts/it.schm.keycloak/crowd-user-storage/ -->
<dependency>
    <groupId>it.schm.keycloak</groupId>
    <artifactId>crowd-user-storage</artifactId>
    <version>1.0.10</version>
</dependency>
// https://jarcasting.com/artifacts/it.schm.keycloak/crowd-user-storage/
implementation 'it.schm.keycloak:crowd-user-storage:1.0.10'
// https://jarcasting.com/artifacts/it.schm.keycloak/crowd-user-storage/
implementation ("it.schm.keycloak:crowd-user-storage:1.0.10")
'it.schm.keycloak:crowd-user-storage:jar:1.0.10'
<dependency org="it.schm.keycloak" name="crowd-user-storage" rev="1.0.10">
  <artifact name="crowd-user-storage" type="jar" />
</dependency>
@Grapes(
@Grab(group='it.schm.keycloak', module='crowd-user-storage', version='1.0.10')
)
libraryDependencies += "it.schm.keycloak" % "crowd-user-storage" % "1.0.10"
[it.schm.keycloak/crowd-user-storage "1.0.10"]

Dependencies

compile (2)

Group / Artifact Type Version
com.atlassian.crowd » crowd-integration-client-rest jar 4.0.1
commons-logging : commons-logging jar 1.2

provided (3)

Group / Artifact Type Version
org.keycloak : keycloak-core jar 10.0.1
org.keycloak : keycloak-server-spi jar 10.0.1
org.jboss.logging : jboss-logging jar 3.4.1.Final

test (7)

Group / Artifact Type Version
javax.xml.bind : jaxb-api jar 2.3.1
org.junit.jupiter : junit-jupiter jar 5.6.2
org.mockito : mockito-core jar 3.3.3
org.mockito : mockito-junit-jupiter jar 3.3.3
org.assertj : assertj-core jar 3.16.0
nl.jqno.equalsverifier : equalsverifier jar 3.1.13
org.jacoco : org.jacoco.agent jar 0.8.5

Project Modules

There are no modules declared in this project.

Keycloak Crowd User Storage Library

GitHub Build Status Coverage Status Code Climate maintainability Code Climate issues Active

This library provides a Keycloak user federation implementation for Atlassian Crowd, providing access to user's, their details and attributes, as well as crowd group memberships.

Note: The library provides read only access to the connected Crowd instance. For further information on future developments, please see below.

Supported environment

The library has been developed using the latest available versions of its Keycloak and Crowd dependencies, and has been tested to run against:

  • Keycloak v9
  • Crowd Server v4

Other versions have NOT been tested, but Keycloak v8 and up, and Crowd Server v3.7 and up should be supported.

Getting started

Docker

If you have deployed Keycloak using the official docker image, you have the option to:

  • Mount the library: This approach supports hot redeployment, all you need to do is replace the jar on the host, and Keycloak will autodetect the change and redeploy the library for you.
docker run -d --name keycloak \
    --mount type=bind,source=target/crowd-user-storage.jar,target=/opt/jboss/keycloak/standalone/deployments/crowd.jar \
    jboss/keycloak
  • Create image: Create a new image and copy the file to the following location: /opt/jboss/keycloak/standalone/deployments/crowd.jar

Deploy the library

Deploying the library follows the standard Keycloak approach: copy the file to standalone/deployments/ of your keycloak installation, or use the JBoss CLI to do the deployment for you.

Create application in Crowd

You need to have an application configured in Crowd, in order for Keycloak to have access to it. You can follow the official documentation here.

Enable the Provider for a Realm

To add the provider to your Keycloak realm(s), follow the official documentation here. After selecting the crowd provider from the list, the following configuration options are available:

Required Settings

  • Enabled: whether to enable the provider
  • Console Display Name: display name of provider when linked in admin console
  • Priority: priority of provider when doing a user lookup (lowest first)
  • Crowd URL: the url to your crowd instance, e.g. http://host.docker.internal:8095/crowd
  • Crowd Application Name: the name of the application as configured in your crowd instance
  • Crowd Application Password: the password of the application as configured in your crowd instance.

Cache Settings

  • Cache Policy: the cache policy for this provider

Development

System Requirements

The Crowd User Storage Library is developed using Java 8 (Java SDK 1.8) and Maven (Maven 3.5+).

Building

To build this provider run the following maven command:

mvn clean package

Implemented capability interfaces

The following interfaces have been implemented:

  • UserLookupProvider: basic user lookup (id, username, email)
  • UserQueryProvider: complex queries that are used to locate one or more users
  • CredentialInputValidator: validate CredentialInput, i.e. verify a password

The following interfaces will follow in the future:

  • CredentialInputUpdater: credential type and update handling
  • UserRegistrationProvider: adding and removing users

Todo

  • Implement UserLookupProvider
  • Implement UserQueryProvider
  • Implement CredentialInputValidator
  • Add EditMode.UNSYNCED support (updates are stored locally)
  • Add EditMode.WRITABLE support (updates are stored in Crowd)
  • Add user import/synchronization support (users, groups and their respective attributes are copied to Keycloak)
  • Implement CredentialInputUpdater (allow updating credentials in Crowd)
  • Implement UserRegistrationProvider (allow creating and removing users in Crowd)

Versions

Version
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0