Skip to content

A script to pull the existing client secret or generate a new client secret using the Keycloak API for a given Client of a given Realm.

License

Notifications You must be signed in to change notification settings

trevor-viljoen/keycloak-client-secret

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

keycloak-client-secret

This script will pull the existing client_secret for a given Keycloak client in a given realm or generate a new secret for the same. It was designed to work with the Red Hat OpenShift Keycloak Operator, but could be reworked to work with any Keycloak deployment. Please open an issue and/or a pull request.

  keycloak_client_secret.sh Copyright (C) 2021 Trevor Viljoen <[email protected]>

  This program comes with ABSOLUTELY NO WARRANTY; for details type keycloak_client_secret.sh --warranty,
  This is free software, and you are welcome to redistribute it under certain conditions;
  type keycloak_client_secret.sh --conditions for details.

  Options:
    -n, --namespace Keycloak Namespace
    -r, --realm Kecloak Realm Name
    -c, --client-id Keycloak Realm Client ID (name)
    -g, --generate Generate a new Keycloak Realm Client Secret
    -c, --conditions Display the conditions
    -w, --warranty Display the warranty

Get Secret Example:

$ ./keycloak_client_secret.sh -n namespace -r realm -c example-client
1b2dc479-8fad-2cae-1f8c-9382ca8de93f

Create New Secret Example:

$ ./keycloak_client_secret.sh -n namespace -r realm -c example-client --generate
a2bed938-2864-ac72-2d7f-528cde07f821

About

A script to pull the existing client secret or generate a new client secret using the Keycloak API for a given Client of a given Realm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages