Bases: object
Interface description for a Token provider.
Return the version of the given token data.
If the given token data is unrecognizable, UnsupportedTokenVersionException is raised.
Parameters: | token_data (dict) – token_data |
---|---|
Returns: | token version string |
Raises keystone.exception.UnsupportedTokenVersionException: | |
If the token version is not expected. |
Issue a V2 token.
Parameters: |
|
---|---|
Returns: | (token_id, token_data) |
Issue a V3 Token.
Parameters: |
|
---|---|
Returns: | (token_id, token_data) |
Determine if the token should be persisted.
If the token provider requires that the token be persisted to a backend this should return True, otherwise return False.
Validate the given V3 token and return the token_data.
Parameters: | token_ref (dict) – the token reference |
---|---|
Returns: | token data |
Raises keystone.exception.TokenNotFound: | |
If the token doesn’t exist. |
Bases: object
Create V2 token data.
Munge catalogs from internal to output format.
Internal catalogs look like:
{$REGION: {
{$SERVICE: {
$key1: $value1,
...
}
}
}
The legacy api wants them to look like:
[{'name': $SERVICE[name],
'type': $SERVICE,
'endpoints': [{
'tenantId': $tenant_id,
...
'region': $REGION,
}],
'endpoints_links': [],
}]
Convert v3 token data into v2.0 token data.
This method expects a dictionary generated from V3TokenDataHelper.get_token_data() and converts it to look like a v2.0 token dictionary.
Parameters: |
|
---|---|
Returns: | dictionary formatted for v2 tokens |
Raises keystone.exception.Unauthorized: | |
If a specific token type is not supported in v2. |
Bases: object
Token data helper.
Populate roles basing on provided groups and project/domain.
Used for federated users with dynamically assigned groups. This method does not return anything, yet it modifies token_data in place.
Parameters: |
|
---|---|
Raises keystone.exception.Unauthorized: | |
when no roles were found |
Build the audit data for a token.
If parent_audit_id is None, the list will be one element in length containing a newly generated audit_id.
If parent_audit_id is supplied, the list will be two elements in length containing a newly generated audit_id and the parent_audit_id. The parent_audit_id will always be element index 1 in the resulting list.
Parameters: | parent_audit_id (str) – the audit of the original token in the chain |
---|---|
Returns: | Keystone token audit data |
Keystone UUID Token Provider.