Oathkeeper

  • Identity Charmers
Channel Revision Published Runs on
latest/stable 39 24 Apr 2024
Ubuntu 22.04
latest/edge 70 09 Dec 2024
Ubuntu 22.04
0.3/edge 63 07 Nov 2024
Ubuntu 22.04
0.2/stable 41 25 Apr 2024
Ubuntu 22.04
0.2/edge 41 25 Apr 2024
Ubuntu 22.04
juju deploy oathkeeper
Show information

Platform:

charms.oathkeeper.v0.oathkeeper_info

Interface library for sharing oathkeeper info.

This library provides a Python API for both requesting and providing oathkeeper deployment info, such as endpoints, namespace and ConfigMap details.

Getting Started

To get started using the library, you need to fetch the library using charmcraft.

cd some-charm
charmcraft fetch-lib charms.oathkeeper.v0.oathkeeper_info

To use the library from the requirer side: In the metadata.yaml of the charm, add the following:

requires:
  oathkeeper-info:
    interface: oathkeeper_info
    limit: 1

Then, to initialise the library:

from charms.oathkeeper.v0.oathkeeper_info import OathkeeperInfoRequirer
Class SomeCharm(CharmBase):
    def __init__(self, *args):
        self.oathkeeper_info_relation = OathkeeperInfoRequirer(self)
        self.framework.observe(self.on.some_event_emitted, self.some_event_function)
    def some_event_function():
        # fetch the relation info
        if self.oathkeeper_info_relation.is_ready():
            oathkeeper_data = self.oathkeeper_info_relation.get_oathkeeper_info()

class OathkeeperInfoRelationCreatedEvent

Description

Event to notify the charm that the relation is ready. None

class OathkeeperInfoProviderEvents

Description

Event descriptor for events raised by OathkeeperInfoProvider. None

class OathkeeperInfoProvider

Description

Provider side of the oathkeeper-info relation. None

Methods

OathkeeperInfoProvider. __init__( self , charm: CharmBase , relation_name: str )

OathkeeperInfoProvider. send_info_relation_data( self , public_endpoint: str , rules_configmap_name: str , configmaps_namespace: str )

Description

Updates relation with endpoints and configmaps info. None

class OathkeeperInfoRelationError

Description

Base class for the relation exceptions. None

class OathkeeperInfoRelationMissingError

Description

Raised when the relation is missing. None

Methods

OathkeeperInfoRelationMissingError. __init__( self )

class OathkeeperInfoRelationDataMissingError

Description

Raised when information is missing from the relation. None

Methods

OathkeeperInfoRelationDataMissingError. __init__( self , message: str )

class OathkeeperInfoRequirer

Description

Requirer side of the oathkeeper-info relation. None

Methods

OathkeeperInfoRequirer. __init__( self , charm: CharmBase , relation_name: str )

OathkeeperInfoRequirer. is_ready( self )

Checks whether the relation data is ready.

Description

Returns True when Oathkeeper shared the config; False otherwise.

OathkeeperInfoRequirer. get_oathkeeper_info( self )

Description

Get the oathkeeper info. None