jaas:manage
Name
jaas:manage, manage — opens a JAAS realm for editing
Synopsis
jaas:manage
[
--help
] {[
--realm realm
] | [
--index index
]} [
--module module
] [
--force
]
Details
The jaas:manage command is the first step in editing a JAAS realm. It opens the realm so that calls to the jaas:* editing commands will update the selected realm. The edits made by the jaas:* editing commands are placed in a buffer associated with the selected realm and not written to the realm until the editing session is ended by the jaas:update command.
If you use the jaas:manage command before saving the changes to a realm that is open for editing, the changes to the previously open realm are abandoned. The pending edits for the previous realm are cleared without being saved.
While editing a realm you can get a list of the pending changes using the jaas:pending command.
Arguments
Table 10.2, “jaas:manage Arguments” describes the command's arguments.
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--realm | Select the realm to edit by specifying its realm name. |
--index | Select the realm to edit by specifying its index. |
--module | Specify which of the realm's login modules are to be edited. |
--force | Force the switch to the specified realm. If a different realm was already opened for editing its changes are abandoned without being applied. |
Examples
You can select the realm to manage either by specifying its realm name or by specifying its index.
If the installed realm names are all distinct (which you can check using jaas:realms), you can identify the realm to manage by specifying the
--realm
option. For example, if the container is a standalone instance (no fabric installed), you can start to edit the karaf
realm as follows:
jaas:manage --realm karaf
If the container belongs to a fabric, however, the
fabric-jaas
feature automatically installs another realm named karaf
at a higher priority, so that it overrides the default karaf
realm. For example, in a fabric, the jaas:realms command returns a list similar to the following:
Index Realm Module Class 1 karaf org.apache.karaf.jaas.modules.properties.PropertiesLoginModule 2 karaf io.fabric8.jaas.ZookeeperLoginModule
In this case, you must identify the realm to manage using the
--index
option, specifying one of the index values from the list. The current active karaf
realm is the ZookeeperLoginModule
, which is selected by the index value, 2
, as follows:
jaas:manage --index 2