From e90a1cc920d4296589f88fa8e5a0556660339fb3 Mon Sep 17 00:00:00 2001 From: phil Date: Sat, 1 Feb 2025 02:16:40 +0100 Subject: [PATCH] Update README --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0dc11be..9e00474 100644 --- a/README.md +++ b/README.md @@ -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://" + account_url_template: "/account" 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: "" 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