canonical / oathkeeper-operator

Charmed Ory Oathkeeper
https://charmhub.io/oathkeeper
Apache License 2.0
1 stars 4 forks source link

Add kratos integration #8

Closed natalian98 closed 1 year ago

natalian98 commented 1 year ago

Issue

Oathkeeper is currently using default dummy values for kratos urls.

Solution

This PR adds integration with kratos through the kratos_endpoints library.

Additional context

n/a

Testing Instructions

  1. Pack and deploy oathkeeper charm
  2. Deploy kratos (with the updated library)
  3. juju integrate kratos oathkeeper
  4. Deploy traefik and integrate with kratos:
    
    juju deploy traefik-k8s traefik-public --channel edge
    juju deploy traefik-k8s traefik-admin --channel edge

juju integrate traefik-public kratos:public-ingress juju integrate traefik-admin kratos:admin-ingress

6. `juju show-unit oathkeeper/0` to check if the relation data was passed correctly.
Get the oathkeeper config file to confirm it was rendered correctly:

juju ssh oathkeeper/0 "PYTHONPATH=agents/unit-oathkeeper-0/charm/venv/ python3 -c ' from ops import pebble p = pebble.Client(\"/charm/containers/oathkeeper/pebble.socket\") f = p.pull(\"/etc/config/oathkeeper.yaml\") print(f.read()) '"



## Release Notes
<!-- A digestable summary of the changes in this PR -->
added integration with kratos