forked from keycloak/keycloak
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Peter Zaoral <[email protected]>
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,8 @@ | |
import java.util.List; | ||
import java.util.Optional; | ||
|
||
import static org.keycloak.services.managers.ApplianceBootstrap.TEMP_ADMIN_ATTR_NAME; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Marek Posolda</a> | ||
*/ | ||
|
@@ -96,6 +98,9 @@ public Response processFlow() { | |
} | ||
|
||
logger.debugv("Client {0} authenticated by {1}", client.getClientId(), factory.getId()); | ||
if (Boolean.parseBoolean(client.getAttribute(TEMP_ADMIN_ATTR_NAME))) { | ||
logger.warn(client.getClientId() + " is a temporary admin service account. To harden security, create a permanent account and delete the temporary one."); | ||
} | ||
processor.getEvent().detail(Details.CLIENT_AUTH_METHOD, factory.getId()); | ||
return null; | ||
} | ||
|
@@ -107,7 +112,7 @@ public Response processFlow() { | |
processor.getEvent().error(Errors.INVALID_CLIENT); | ||
return alternativeChallenge; | ||
} | ||
|
||
throw new AuthenticationFlowException("Invalid client or Invalid client credentials", AuthenticationFlowError.CLIENT_NOT_FOUND); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters