Update README
Some checks failed
/ build (push) Failing after 15s
/ test (push) Successful in 5s

This commit is contained in:
phil 2025-02-01 02:16:40 +01:00
parent 17bf34a8a1
commit e90a1cc920

View file

@ -16,6 +16,12 @@ as a template for integration in other FastAPI/SQLModel applications.
Feedback welcome.
## Resource server
It also functions as a resource server in a OAuth architecture.
See a sibling test project, a web based OIDC/OAuth:
[oidc-vue-test](https://code.philo.ydns.eu/philorg/oidc-vue-test).
## RBAC
The application is also a playground for RBAC (Role Based Access control)
@ -45,7 +51,7 @@ given by the OIDC providers.
For example:
```text
```yaml
oidc:
secret_key: "ASecretNoOneKnows"
show_session_details: yes
@ -60,6 +66,7 @@ oidc:
- id: keycloak
name: Keycloak at somewhere
url: "https://<the_keycloak_realm_url>"
account_url_template: "/account"
client_id: "<your_keycloak_client_id>"
client_secret: "client_secret_generated_by_keycloak"
hint: "User: foo, password: foofoo"
@ -67,14 +74,27 @@ oidc:
- id: codeberg
name: Codeberg
url: "https://codeberg.org"
account_url_template: "/user/settings"
client_id: "<your_codeberg_client_id>"
client_secret: "client_secret_generated_by_codeberg"
resources:
- name: List of repos
id: repos
url: /api/v1/user/repos
- name: List of OAuth2 applications
id: oauth2_applications
url: /api/v1/user/applications/oauth2
cors_origins:
- https://some.client
- https://localhost:8000
```
The application reads the `OIDC_TEST_SETTINGS_FILE` environment variable
to determine the location of this file at startup.
For example, to run on port 8000 in a container, with the setting file in the current working directory:
For example, to run on port 8000 in a container,
with the setting file in the current working directory:
```sh
podman run -p 8000:80 --env OIDC_TEST_CONFIG_FILE=/app/settings.yaml --mount type=bind,source=settings.yaml,destination=/app/settings.yaml code.philo.ydns.eu/philorg/oidc-fastapi-test:latest