keystone.contrib.federation package

Submodules

keystone.contrib.federation.controllers module

keystone.contrib.federation.core module

Extension supporting Federation.

class keystone.contrib.federation.core.Driver[source]

Bases: object

create_idp(idp_id, idp)[source]

Create an identity provider.

Returns:idp_ref
create_mapping(mapping_ref)[source]

Create a mapping.

Parameters:mapping_ref (dict) – mapping ref with mapping name
Returns:mapping_ref
create_protocol(idp_id, protocol_id, protocol)[source]

Add an IdP-Protocol configuration.

Raises:keystone.exception.IdentityProviderNotFound
create_sp(sp_id, sp)[source]

Create a service provider.

Parameters:
  • sp_id (string) – id of the service provider
  • sp (dict) – service prvider object
Returns:

sp_ref

Return type:

dict

delete_idp(idp_id)[source]

Delete an identity provider.

Raises:keystone.exception.IdentityProviderNotFound
delete_mapping(mapping_id)[source]

Delete a mapping.

Parameters:mapping_id – id of mapping to delete
Returns:None
delete_protocol(idp_id, protocol_id)[source]

Delete an IdP-Protocol configuration.

Raises:keystone.exception.IdentityProviderNotFound, keystone.exception.FederatedProtocolNotFound,
delete_sp(sp_id)[source]

Delete a service provider.

Parameters:sp_id (string) – id of the service provider
Raises:keystone.exception.ServiceProviderNotFound
get_enabled_service_providers()[source]

List enabled service providers for Service Catalog

Service Provider in a catalog contains three attributes: id, auth_url, sp_url, where:

  • id is an unique, user defined identifier for service provider object
  • auth_url is a authentication URL of remote Keystone
  • sp_url a URL accessible at the remote service provider where SAML assertion is transmitted.
Returns:list of dictionaries with enabled service providers
Return type:list of dicts
get_idp(idp_id)[source]

Get an identity provider by ID.

Raises:keystone.exception.IdentityProviderNotFound
get_idp_from_remote_id(remote_id)[source]

Get an identity provider by remote ID.

Raises:keystone.exception.IdentityProviderNotFound
get_mapping(mapping_id)[source]

Get a mapping, returns the mapping based on mapping_id.

Parameters:mapping_id – id of mapping to get
Returns:mapping_ref
get_mapping_from_idp_and_protocol(idp_id, protocol_id)[source]

Get mapping based on idp_id and protocol_id.

Parameters:
  • idp_id (string) – id of the identity provider
  • protocol_id (string) – id of the protocol
Raises:

keystone.exception.IdentityProviderNotFound, keystone.exception.FederatedProtocolNotFound,

Returns:

mapping_ref

get_protocol(idp_id, protocol_id)[source]

Get an IdP-Protocol configuration.

Raises:keystone.exception.IdentityProviderNotFound, keystone.exception.FederatedProtocolNotFound
get_sp(sp_id)[source]

Get a service provider.

Parameters:sp_id (string) – id of the service provider
Returns:sp_ref
Raises:keystone.exception.ServiceProviderNotFound
list_idps()[source]

List all identity providers.

Raises:keystone.exception.IdentityProviderNotFound
list_mappings()[source]

List all mappings.

returns: list of mappings

list_protocols(idp_id)[source]

List an IdP’s supported protocols.

Raises:keystone.exception.IdentityProviderNotFound,
list_sps()[source]

List all service providers.

:returns List of sp_ref objects :rtype: list of dicts

update_idp(idp_id, idp)[source]

Update an identity provider by ID.

Raises:keystone.exception.IdentityProviderNotFound
update_mapping(mapping_id, mapping_ref)[source]

Update a mapping.

Parameters:
  • mapping_id (string) – id of mapping to update
  • mapping_ref (dict) – new mapping ref
Returns:

mapping_ref

update_protocol(idp_id, protocol_id, protocol)[source]

Change an IdP-Protocol configuration.

Raises:keystone.exception.IdentityProviderNotFound, keystone.exception.FederatedProtocolNotFound
update_sp(sp_id, sp)[source]

Update a service provider.

Parameters:
  • sp_id (string) – id of the service provider
  • sp (dict) – service prvider object
Returns:

sp_ref

Return type:

dict

Raises:

keystone.exception.ServiceProviderNotFound

class keystone.contrib.federation.core.Manager(*args, **kwargs)[source]

Bases: keystone.common.manager.Manager

Default pivot point for the Federation backend.

See keystone.common.manager.Manager for more details on how this dynamically calls the backend.

get_enabled_service_providers()[source]

List enabled service providers for Service Catalog

Service Provider in a catalog contains three attributes: id, auth_url, sp_url, where:

  • id is an unique, user defined identifier for service provider object
  • auth_url is a authentication URL of remote Keystone
  • sp_url a URL accessible at the remote service provider where SAML assertion is transmitted.
Returns:list of dictionaries with enabled service providers
Return type:list of dicts

keystone.contrib.federation.idp module

keystone.contrib.federation.routers module

keystone.contrib.federation.schema module

keystone.contrib.federation.utils module

Module contents