canonical / identity-platform-admin-ui

Admin UI for the Canonical identity broker and identity provider solution
Other
6 stars 4 forks source link

IAM-337-Implement Oathkeeper integration #157

Closed bencekov closed 9 months ago

bencekov commented 11 months ago

This PR includes the implementation of the Admin UI Rest interface to access and manipulate Oathkeeper access rules.

Testing Guide:

The following endpoints have been implemented for Admin UI:

Get /api/v0/rules Get /api/v0/rules/{id} Post /api/v0/rules Put /api/v0/rules Delete /api/v0/rules/{id}

{id} is a URL parameter that accepts the Oathkeeper rule IDs specified in a Kubernetes configmap.

The make command make dev sets up a development environment.

shipperizer commented 10 months ago

small nitpicking

there are 3 commits, first one is containing everything, second is tests and third is a "bugfix" of a thing introduced in the first commit

ideally u want to silo commits, so tests go with logic, splitting parts of the logic in concepts helps with commit siloing if a fix is for a bug introduced by the very same branch code, that is defo not a big, but just a wip

nsklikas commented 10 months ago

I think that something is broken. I run:

make dev
curl http://127.0.0.1:8001/api/v0/rules  -X POST -d '{"authenticators":[{"handler":"cookie_session"}],"authorizer":{"handler":"allow"},"id":"mocked_rule1","match":{"methods":["GET","POST"]},"mutators":[{"handler":"header"}],"upstream":{}}'

But then I don't see that rule in the configMap and no matter how many times I make the same curl, I never get an error that the rule already exists.

bencekov commented 9 months ago

The latest commit solved the issue with make dev.