forked from CERIT-SC/funnel-gdi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #2: Fixes and a documentation page about the new config
- Loading branch information
Showing
7 changed files
with
85 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: OAuth2 | ||
menu: | ||
main: | ||
parent: Security | ||
weight: 10 | ||
--- | ||
# OAuth2 | ||
|
||
By default, a Funnel server allows open access to its API endpoints, but in | ||
addition to Basic authentication it can also be configured to require a valid | ||
JWT in the request. | ||
|
||
Funnel itself does not redirect users to perform the login. | ||
It just validates that the presented token is issued by a trusted service | ||
(specified in the configuration file) and the token has not expired. | ||
|
||
Optionally, Funnel can also validate the scope and audience claims to contain | ||
specific values. | ||
|
||
To enable JWT authentication, specify `OidcAuth` section in your config file: | ||
|
||
```yaml | ||
Server: | ||
OidcAuth: | ||
# URL of the OIDC service configuration: | ||
ServiceConfigUrl: "https://my.oidc.service/.well-known/openid-configuration" | ||
# Optional: if specified, this scope value must be in the token: | ||
RequireScope: funnel-id | ||
# Optional: if specified, this audience value must be in the token: | ||
RequireAudience: tes-api | ||
``` | ||
Make sure to properly protect the configuration file so that it's not readable | ||
by everyone: | ||
```bash | ||
$ chmod 600 funnel.config.yml | ||
``` | ||
|
||
To use the token, set the `FUNNEL_SERVER_BEARER` environment variable: | ||
|
||
```bash | ||
$ export FUNNEL_SERVER_BEARER=eyJraWQiOiJyc2ExIiwi... | ||
$ funnel task list | ||
``` |