Update README
This commit is contained in:
parent
17bf34a8a1
commit
e90a1cc920
1 changed files with 22 additions and 2 deletions
24
README.md
24
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://<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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue