Karaf as an Identity Provider
Apache Karaf includes a simple authentication service that is also used to access the Karaf console.
|
When the BPC is started for the first time (or on every startup if it does not exist), a backend Connection for Karaf as an IdP is automatically created.
This Connection has the module name |
|
Access to the Karaf console always occurs via the Karaf Identity Provider (IdP), regardless of the BPC configuration. Therefore, only the |
Configuration
A new backend Connection of type “ identity_provider ” is created.
The following values must be set there:
| Setting (Key) | Group | Value | Description |
|---|---|---|---|
Module_Name |
module |
idp-karaf |
Assign a descriptive and unique name |
IdentityProvider |
config |
karaf |
Set Karaf as the Identity Provider |
Data Source (JAAS File)
User authentication and management for access to the Karaf console is handled via Java Authentication and Authorization Service (JAAS) files. These files—specifically users.properties and keys.properties —allow you to define users and specify their access permissions. Authentication can be configured using either password hashes or public/private key methods.
Using users.properties for Karaf Access
Users are managed via the file <BPC-INSTALL-DIR>/karaf/etc/users.properties.
Passwords are stored as hashes in the file in the format {CRYPT}Passwort-Hash{CRYPT}.
The plaintext password cannot be reconstructed from the password hash.
To change the password, replace {CRYPT}Passwort-Hash{CRYPT} entirely with a plaintext password.
Be sure to also remove the {CRYPT} elements (see also the following examples).
The new password takes effect immediately after the file is saved and is then automatically replaced by a hash.
users.properties File with password hashesbpcadmin = {CRYPT}XYZ{CRYPT},bpcadmin
virtimo = {CRYPT}XYZ{CRYPT},_g_:admingroup,bpcNoFrontend
_g_\:admingroup = group,admin,manager,viewer,systembundles,ssh
users.properties File with plaintext passwordsbpcadmin = einSehrSicheresPasswort123,bpcadmin
virtimo = einAnderesSehrSicheresPasswort123,_g_:admingroup,bpcNoFrontend
_g_\:admingroup = group,admin,manager,viewer,systembundles,ssh
|
If the file syntax is not followed, authentication will fail and result in a |
Using keys.properties for Karaf Access
In addition to users.properties, keys.properties can also be used to authenticate users with SSH keys. This file specifies which users have access via SSH keys, providing additional security.
See Karaf SSH Access.