Skip to content

Instantly share code, notes, and snippets.

@jfdenise
Created April 7, 2023 09:52
Show Gist options
  • Save jfdenise/e38d0f2c0b60728194c88cd045b023bb to your computer and use it in GitHub Desktop.
Save jfdenise/e38d0f2c0b60728194c88cd045b023bb to your computer and use it in GitHub Desktop.
Create an initial user for web-console and setup management console
# Create a user store
/subsystem=elytron/filesystem-realm=exampleFsRealm:add(path=fs-realm-users,relative-to=jboss.server.config.dir)
# Add user admin identity and password admin
/subsystem=elytron/filesystem-realm=exampleFsRealm:add-identity(identity=admin)
/subsystem=elytron/filesystem-realm=exampleFsRealm:set-password(clear={password="admin"}, identity=admin)
# Create the security domain and http-authentication-factory
/subsystem=elytron/security-domain=exampleSD:add(realms=[{realm=exampleFsRealm}], permission-mapper=default-permission-mapper, default-realm=exampleFsRealm)
/subsystem=elytron/http-authentication-factory=example-http-auth:add(http-server-mechanism-factory=global,security-domain=exampleSD,mechanism-configurations=[{mechanism-name=DIGEST,mechanism-realm-configurations=[{realm-name=exampleFsRealm}]}])
# Set the auth factory on the management interface
/core-service=management/management-interface=http-interface:write-attribute(name=http-authentication-factory,value=example-http-auth)
/core-service=management/management-interface=http-interface:write-attribute(name=console-enabled,value=true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment