Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jans-keycloak-integration): update kc saml integration into ce and cn #8776 #8806

Merged
merged 48 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ffe3dbe
fix(jans-linux-setup): improper scim configuration for jans kc #8210
uprightech Apr 3, 2024
76e0414
Merge remote-tracking branch 'origin/main'
uprightech Apr 8, 2024
97f3c02
Merge remote-tracking branch 'origin/main'
uprightech Apr 16, 2024
fadf1f2
chore(jans-keycloak-integration): bump kc version to 24.0.0 #8315
uprightech Apr 16, 2024
8bde8d5
feat(jans-keycloak-integration): keycloak protocol mapper
uprightech Apr 30, 2024
91021f8
Merge remote-tracking branch 'origin/main' into protocol-mapper
uprightech Apr 30, 2024
0273af8
feat(jans-keycloak-integration): remove references to jans standalone…
uprightech May 1, 2024
c021a22
Merge remote-tracking branch 'origin/main' into protocol-mapper
uprightech May 6, 2024
10a0162
feat(jans-keycloak-integration): experimental protocol mapper for kc …
uprightech May 30, 2024
0f1c5a4
feat(jans-keycloak-integration): added dependencies for protocol mapp…
uprightech May 30, 2024
a089c83
feat(jans-keycloak-integration): experimental protocol mapper #8614
uprightech May 30, 2024
aa6e65d
feat(jans-keycloak-integration): experimental protocol mapper #8614
uprightech May 30, 2024
6e6e085
feat(jans-keycloak-integration): janssen spi bundle #8614
uprightech May 31, 2024
c006ad2
feat(jans-keycloak-integration): janssen spi bundle #8614
uprightech May 31, 2024
6e99863
feat(jans-keycloak-integration): enhancements to job-scheduler #8614
uprightech Jun 18, 2024
2367adb
feat(jans-keycloak-integration): keycloak integration enhancements #…
uprightech Jun 18, 2024
a839e12
feat(jans-keycloak-integration): spi bundle #8614
uprightech Jun 18, 2024
79d3255
feat(jans-keycloak-integration): keycloak integration enhancements #8614
uprightech Jun 18, 2024
76e79f3
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
4f453ab
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
abf22ed
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
a67f977
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
7e4567e
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
7ec45bd
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
88eac7f
Merge remote-tracking branch 'origin/main' into issue_8614
uprightech Jun 18, 2024
086808d
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
f444ea1
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
92ee6d2
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
f25ff29
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 18, 2024
a84d52a
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 19, 2024
b4459c1
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 19, 2024
78920ff
Merge remote-tracking branch 'origin/main' into issue_8614
uprightech Jun 20, 2024
db62d0f
feat(jans-keycloak-integration): enhancement to jans-keycloak-integra…
uprightech Jun 20, 2024
c405477
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 20, 2024
0870995
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 24, 2024
64575c7
Merge remote-tracking branch 'origin/main' into issue_8614
uprightech Jun 24, 2024
b571739
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 24, 2024
1a1de0f
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 24, 2024
f609351
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 24, 2024
d5f9221
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
uprightech Jun 24, 2024
d78a5c4
feat(jans-keycloak-integration): update kc-saml integration installat…
uprightech Jun 25, 2024
4f7f4ed
feat(jans-keycloak-integration): update kc-saml integration installat…
uprightech Jun 25, 2024
4532319
feat(jans-keycloak-integration): update kc-saml integration installat…
uprightech Jun 25, 2024
aaa0046
feat(jans-keycloak-integration): update kc-saml integration installat…
uprightech Jun 27, 2024
466f996
feat(jans-keycloak-integration): update kc-saml integration installat…
uprightech Jun 27, 2024
211ba36
Merge remote-tracking branch 'origin/main' into issue_8776
uprightech Jun 27, 2024
8cdc1a1
Merge remote-tracking branch 'origin/main' into issue_8776
uprightech Jun 28, 2024
98f2213
fix(jans-keycloak-integration): fix build issue after bumping keycloa…
uprightech Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(jans-keycloak-integration): enhancements to jans-keycloak-integr…
…ation #8614

* added new storage provider implementation

Signed-off-by: Rolain Djeumen <uprightech@gmail.com>
  • Loading branch information
uprightech committed Jun 18, 2024
commit a67f97759bc1c63a9c9ec83bdf473b3017ee3ee3
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package io.jans.kc.spi.storage;

import org.keycloak.models.RealmModel;
import org.keycloak.models.UserModel;

import org.keycloak.storage.StorageId;
import org.keycloak.storage.UserStorageProvider;
import org.keycloak.storage.user.UserLookupProvider;

import io.jans.kc.model.JansUserModel;
import io.jans.kc.spi.custom.JansThinBridgeOperationException;
import io.jans.kc.spi.custom.JansThinBridgeProvider;

import org.jboss.logging.Logger;

public class JansUserStorageProvider implements UserStorageProvider, UserLookupProvider {

private static final Logger log = Logger.getLogger(JansUserStorageProvider.class);

private final JansThinBridgeProvider jansThinBridge;

public JansUserStorageProvider(final JansThinBridgeProvider jansThinBridge) {

this.jansThinBridge = jansThinBridge;
}

@Override
public void close() {

}

@Override
public UserModel getUserByUsername(RealmModel realm, String username) {

try {
return jansThinBridge.getUserByUsername(username);
}catch(JansThinBridgeOperationException e) {
log.errorv(e,"Error fetching jans user with username " + username);
}
return null;
}

@Override
public UserModel getUserByEmail(RealmModel realm, String email) {

try {
return jansThinBridge.getUserByEmail(email);
}catch(JansThinBridgeOperationException e) {
log.errorv(e,"Error fetching jans user with email " + email);
}
return null;
}

@Override
public UserModel getUserById(RealmModel realm, String id) {

try {
StorageId storageId = new StorageId(id);
final String inum = storageId.getExternalId();
return jansThinBridge.getUserByInum(inum);
}catch(JansThinBridgeOperationException e) {
log.errorv(e,"Error fetching jans user with id " + id);
}
return null;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package io.jans.kc.spi.storage;

import org.keycloak.component.ComponentModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.storage.UserStorageProviderFactory;

import io.jans.kc.spi.ProviderIDs;
import io.jans.kc.spi.JansSpiInitException;
import io.jans.kc.spi.custom.JansThinBridgeProvider;

public class JansUserStorageProviderFactory implements UserStorageProviderFactory<JansUserStorageProvider> {


private static final String PROVIDER_ID = ProviderIDs.JANS_USER_STORAGE_PROVIDER;

@Override
public String getId() {

//TODO implement this
return PROVIDER_ID;
}

@Override
public JansUserStorageProvider create(KeycloakSession session, ComponentModel model) {

JansThinBridgeProvider jansThinBridgeProvider = session.getProvider(JansThinBridgeProvider.class);
if(jansThinBridgeProvider == null) {
throw new JansSpiInitException("Could not obtain reference to thin bridge provider");
}
return new JansUserStorageProvider(jansThinBridgeProvider);
}
}