public class GuestClaimsHandlerExt extends Object
The governing data structure lives in ~/etc/ws-security/profiles.json
where the
outter-most map represents the profile, and each profile must have inner-maps guestClaims
, systemClaims
, and configs
. Each have a respective destination:
guest claims are sent to the guest claims handler using the appropriate configuration, system
claims are written to ~/etc/users.attributes
, and configs allow arbitrary configuration
info to be submitted to ConfigurationAdmin
.
An example use case for the configs entity: setting UI banners based upon the selected profile.
Modifier and Type | Field and Description |
---|---|
static String |
AVAILABLE_CLAIMS |
static String |
AVAILABLE_PROFILES |
static String |
DEFAULT_NAME |
static String |
IMMUTABLE_CLAIMS |
static String |
PID_KEY |
static String |
PROFILE_NAMES |
static String |
PROPERTIES_KEY |
Constructor and Description |
---|
GuestClaimsHandlerExt(PropertiesFileReader propertiesFileReader,
List<String> immutableClaims,
String availableClaimsFile,
String profilesFilePath)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getClaims()
Get a map of both the available and immutable claims.
|
Map<String,Object> |
getClaimsProfiles()
Get a map of the claims profiles data.
|
List<Map<String,Object>> |
getProfileConfigs()
Returns a list of maps representing misc configs that should be sent to
ConfigurationAdminImpl when initializing the selected security profile, or null if no
profile has been selected. |
Map<String,Object> |
getProfileGuestClaims()
Returns a map of guest claims that should be applied to all anonymous users, or
null if
no profile has been selected. |
Map<String,Object> |
getProfileSystemClaims()
Returns a map of system claims that should be written to users.attributes upon installation, or
null if no profile has been selected. |
void |
init()
Called by the container to initialize the object.
|
void |
setSelectedClaimsProfileName(String selectedClaimsProfileName)
Submit the name of the profile listed in each configuration to select that configuration for
use.
|
public static final String PID_KEY
public static final String PROPERTIES_KEY
public static final String AVAILABLE_PROFILES
public static final String PROFILE_NAMES
public static final String AVAILABLE_CLAIMS
public static final String IMMUTABLE_CLAIMS
public static final String DEFAULT_NAME
public GuestClaimsHandlerExt(PropertiesFileReader propertiesFileReader, List<String> immutableClaims, String availableClaimsFile, String profilesFilePath)
public void init()
public void setSelectedClaimsProfileName(String selectedClaimsProfileName)
selectedClaimsProfileName
- the name of the profile to be used.@Nullable public Map<String,Object> getProfileGuestClaims()
null
if
no profile has been selected.@Nullable public Map<String,Object> getProfileSystemClaims()
null
if no profile has been selected.SystemPropertiesAdmin
@Nullable public List<Map<String,Object>> getProfileConfigs()
ConfigurationAdminImpl
when initializing the selected security profile, or null
if no
profile has been selected.public Map<String,Object> getClaimsProfiles()
flatCopyProfileData(Map)
This work is licensed under a Creative Commons Attribution 4.0 International License.