---
title: Charmhub | Deploy Oathkeeper using Charmhub - The Open Operator Collection
description: Deploy the latest version of Oathkeeper as a Kubernetes Operator on any
  cloud.
url: https://charmhub.io/oathkeeper/libraries/oathkeeper_info
---

# Oathkeeper

[Identity Charmers](https://charmhub.io/publisher/identity-charmers "View all packages from Identity Charmers")

* [Identity Charmers](https://charmhub.io/publisher/identity-charmers "View all packages from Identity Charmers")

Platform:

stable 39

```
juju deploy oathkeeper
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

[Toggle side navigation](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#drawer)

## charms.oathkeeper.v0.oathkeeper\_info

* [*Docstrings*Docstrings](https://charmhub.io/oathkeeper/libraries/oathkeeper_info)
  [*Code*Source code](https://charmhub.io/oathkeeper/libraries/oathkeeper_info/source-code)
* + Download

    Fetch library

    ```
    charmcraft fetch-lib charms.oathkeeper.v0.oathkeeper_info
    ```

    [Download oathkeeper\_info.py](https://charmhub.io/oathkeeper/libraries/oathkeeper_info/download)
  + *Last updated* 18 Apr 2024
  + *Revision* Library version 0.2

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()
```

---

Index

* [class OathkeeperInfoRelationCreatedEvent](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforelationcreatedevent)
* [class OathkeeperInfoProviderEvents](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinfoproviderevents)
* [class OathkeeperInfoProvider](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinfoprovider)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinfoprovider-__init__)
* + [def send\_info\_relation\_data(
    self,
    public\_endpoint,
    rules\_configmap\_name,
    configmaps\_namespace)](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinfoprovider-send_info_relation_data)
* [class OathkeeperInfoRelationError](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforelationerror)
* [class OathkeeperInfoRelationMissingError](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforelationmissingerror)
* + [def \_\_init\_\_(
    self)](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforelationmissingerror-__init__)
* [class OathkeeperInfoRelationDataMissingError](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforelationdatamissingerror)
* + [def \_\_init\_\_(
    self,
    message)](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforelationdatamissingerror-__init__)
* [class OathkeeperInfoRequirer](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforequirer)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforequirer-__init__)
* + [def is\_ready(
    self)](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforequirer-is_ready)
* + [def get\_oathkeeper\_info(
    self)](https://charmhub.io/oathkeeper/libraries/oathkeeper_info#oathkeeperinforequirer-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
