Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
keycloak-scim
Manage
Activity
Members
Labels
Plan
Issues
13
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
libre.sh
scim
keycloak-scim
Commits
5aa9410b
Commit
5aa9410b
authored
1 year ago
by
Alex Morel
Browse files
Options
Downloads
Patches
Plain Diff
Improve logging
parent
080cc8c2
No related branches found
No related tags found
1 merge request
!3
Sonar refactoring
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/sh/libre/scim/core/AbstractScimService.java
+2
-2
2 additions, 2 deletions
src/main/java/sh/libre/scim/core/AbstractScimService.java
src/main/java/sh/libre/scim/core/ScimDispatcher.java
+4
-4
4 additions, 4 deletions
src/main/java/sh/libre/scim/core/ScimDispatcher.java
with
6 additions
and
6 deletions
src/main/java/sh/libre/scim/core/AbstractScimService.java
+
2
−
2
View file @
5aa9410b
...
@@ -78,7 +78,7 @@ public abstract class AbstractScimService<RMM extends RoleMapperModel, S extends
...
@@ -78,7 +78,7 @@ public abstract class AbstractScimService<RMM extends RoleMapperModel, S extends
KeycloakId
id
=
getId
(
roleMapperModel
);
KeycloakId
id
=
getId
(
roleMapperModel
);
ScimResource
scimResource
=
findById
(
id
).
get
();
ScimResource
scimResource
=
findById
(
id
).
get
();
EntityOnRemoteScimId
externalId
=
scimResource
.
getExternalIdAsEntityOnRemoteScimId
();
EntityOnRemoteScimId
externalId
=
scimResource
.
getExternalIdAsEntityOnRemoteScimId
();
ResourceNode
scimForReplace
=
toScimForReplace
(
roleMapperModel
,
externalId
);
S
scimForReplace
=
toScimForReplace
(
roleMapperModel
,
externalId
);
scimClient
.
replace
(
externalId
,
scimForReplace
);
scimClient
.
replace
(
externalId
,
scimForReplace
);
}
catch
(
NoSuchElementException
e
)
{
}
catch
(
NoSuchElementException
e
)
{
LOGGER
.
warnf
(
"failed to replace resource %s, scim mapping not found"
,
getId
(
roleMapperModel
));
LOGGER
.
warnf
(
"failed to replace resource %s, scim mapping not found"
,
getId
(
roleMapperModel
));
...
@@ -87,7 +87,7 @@ public abstract class AbstractScimService<RMM extends RoleMapperModel, S extends
...
@@ -87,7 +87,7 @@ public abstract class AbstractScimService<RMM extends RoleMapperModel, S extends
}
}
}
}
protected
abstract
ResourceNode
toScimForReplace
(
RMM
roleMapperModel
,
EntityOnRemoteScimId
externalId
);
protected
abstract
S
toScimForReplace
(
RMM
roleMapperModel
,
EntityOnRemoteScimId
externalId
);
public
void
delete
(
KeycloakId
id
)
{
public
void
delete
(
KeycloakId
id
)
{
try
{
try
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/sh/libre/scim/core/ScimDispatcher.java
+
4
−
4
View file @
5aa9410b
...
@@ -72,13 +72,13 @@ public class ScimDispatcher {
...
@@ -72,13 +72,13 @@ public class ScimDispatcher {
public
void
dispatchUserModificationToAll
(
Consumer
<
UserScimService
>
operationToDispatch
)
{
public
void
dispatchUserModificationToAll
(
Consumer
<
UserScimService
>
operationToDispatch
)
{
initializeClientsIfNeeded
();
initializeClientsIfNeeded
();
userScimServices
.
forEach
(
operationToDispatch
);
userScimServices
.
forEach
(
operationToDispatch
);
logger
.
infof
(
"[SCIM] User operation dispatched to %d SCIM
clients
"
,
userScimServices
.
size
());
logger
.
infof
(
"[SCIM] User operation dispatched to %d SCIM
server
"
,
userScimServices
.
size
());
}
}
public
void
dispatchGroupModificationToAll
(
Consumer
<
GroupScimService
>
operationToDispatch
)
{
public
void
dispatchGroupModificationToAll
(
Consumer
<
GroupScimService
>
operationToDispatch
)
{
initializeClientsIfNeeded
();
initializeClientsIfNeeded
();
groupScimServices
.
forEach
(
operationToDispatch
);
groupScimServices
.
forEach
(
operationToDispatch
);
logger
.
infof
(
"[SCIM] Group operation dispatched to %d SCIM
clients
"
,
groupScimServices
.
size
());
logger
.
infof
(
"[SCIM] Group operation dispatched to %d SCIM
server
"
,
groupScimServices
.
size
());
}
}
public
void
dispatchUserModificationToOne
(
ComponentModel
scimServerConfiguration
,
Consumer
<
UserScimService
>
operationToDispatch
)
{
public
void
dispatchUserModificationToOne
(
ComponentModel
scimServerConfiguration
,
Consumer
<
UserScimService
>
operationToDispatch
)
{
...
@@ -87,7 +87,7 @@ public class ScimDispatcher {
...
@@ -87,7 +87,7 @@ public class ScimDispatcher {
Optional
<
UserScimService
>
matchingClient
=
userScimServices
.
stream
().
filter
(
u
->
u
.
getConfiguration
().
getId
().
equals
(
scimServerConfiguration
.
getId
())).
findFirst
();
Optional
<
UserScimService
>
matchingClient
=
userScimServices
.
stream
().
filter
(
u
->
u
.
getConfiguration
().
getId
().
equals
(
scimServerConfiguration
.
getId
())).
findFirst
();
if
(
matchingClient
.
isPresent
())
{
if
(
matchingClient
.
isPresent
())
{
operationToDispatch
.
accept
(
matchingClient
.
get
());
operationToDispatch
.
accept
(
matchingClient
.
get
());
logger
.
infof
(
"[SCIM] User operation dispatched to SCIM
client
%s"
,
matchingClient
.
get
().
getConfiguration
().
getId
());
logger
.
infof
(
"[SCIM] User operation dispatched to SCIM
server
%s"
,
matchingClient
.
get
().
getConfiguration
().
getId
());
}
else
{
}
else
{
logger
.
error
(
"[SCIM] Could not find a Scim Client matching endpoint configuration"
+
scimServerConfiguration
.
getId
());
logger
.
error
(
"[SCIM] Could not find a Scim Client matching endpoint configuration"
+
scimServerConfiguration
.
getId
());
}
}
...
@@ -100,7 +100,7 @@ public class ScimDispatcher {
...
@@ -100,7 +100,7 @@ public class ScimDispatcher {
Optional
<
GroupScimService
>
matchingClient
=
groupScimServices
.
stream
().
filter
(
u
->
u
.
getConfiguration
().
getId
().
equals
(
scimServerConfiguration
.
getId
())).
findFirst
();
Optional
<
GroupScimService
>
matchingClient
=
groupScimServices
.
stream
().
filter
(
u
->
u
.
getConfiguration
().
getId
().
equals
(
scimServerConfiguration
.
getId
())).
findFirst
();
if
(
matchingClient
.
isPresent
())
{
if
(
matchingClient
.
isPresent
())
{
operationToDispatch
.
accept
(
matchingClient
.
get
());
operationToDispatch
.
accept
(
matchingClient
.
get
());
logger
.
infof
(
"[SCIM] Group operation dispatched to SCIM
client
%s"
,
matchingClient
.
get
().
getConfiguration
().
getId
());
logger
.
infof
(
"[SCIM] Group operation dispatched to SCIM
server
%s"
,
matchingClient
.
get
().
getConfiguration
().
getId
());
}
else
{
}
else
{
logger
.
error
(
"[SCIM] Could not find a Scim Client matching endpoint configuration"
+
scimServerConfiguration
.
getId
());
logger
.
error
(
"[SCIM] Could not find a Scim Client matching endpoint configuration"
+
scimServerConfiguration
.
getId
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment