Skip to content

Commit

Permalink
Add Documentation for OAuth2
Browse files Browse the repository at this point in the history
  • Loading branch information
trobanga committed Jan 24, 2025
1 parent 0644240 commit 35d3194
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Generate Code Coverage Report
run: mvn ${MAVEN_ARGS} jacoco:report-aggregate@report

- name: Upload coverage to Codecov
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@0da7aa657d958d32c117fc47e1f977e7524753c7 # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default withMermaid({
text: 'Security', link: '/configuration/security',
items: [
{text: 'Basic Auth', link: '/configuration/security/basic'},
{text: 'OAuth2', link: '/configuration/security/oauth2'},
{text: 'Client Certs', link: '/configuration/security/client-certs'},
]
},
Expand Down
2 changes: 2 additions & 0 deletions docs/configuration/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@ Contains the authentication mechanisms for securing endpoints.

* #### `basic`
Configuration for [basic authentication](./security/basic).
* #### `oauth2`
Configuration for [oauth2 authentication](./security/oauth2).
* #### `clientCert`
Configuration for [client certificate authentication](./security/client-certs).
25 changes: 25 additions & 0 deletions docs/configuration/security/oauth2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# OAuth2 Authentication <Badge type="tip" text="All Agents" />

Basic authentication uses predefined username and password pairs for user access control.

## Configuration Example

```yaml
oauth2:
issuer: http://localhost:8080/realms/fts
client-id: fts-client
```
## Fields
### `issuer`

* **Desciption**: URL of the authorization server
* **Type**: URL
* **Example**: `http://localhost:8080/realms/fts`

### `client-id`

* **Description**: The clientId
* **Type**: String
* **Example**: `client`
8 changes: 8 additions & 0 deletions docs/types/HttpClientConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
| Field Name | Type | Required | Default | Description |
|---------------|-----------------------------------------------------------|----------|---------|----------------------------------|
| `basic` | [`HttpClientBasicAuth`](#HttpClientBasicAuth) | No | | Basic auth configuration. |
| `oauth2` | [`HttpClientOauth2Auth`](#HttpClientOauth2Auth) | No | | OAuth2 configuration. |
| `cookieToken` | [`HttpClientCookieTokenAuth`](#HttpClientCookieTokenAuth) | No | | Cookie token auth configuration. |

### SSL
Expand All @@ -42,6 +43,13 @@
| `user` | `String` | Yes | | Basic auth username |
| `password` | `String` | Yes | | Basic auth password |

### HttpClientOauth2Auth

| Field Name | Type | Required | Default | Description |
|------------|----------|----------|---------|---------------------------------|
| `issuer` | `String` | Yes | | URL of the authorization server |
| `clientId` | `String` | Yes | | The clientId |

### HttpClientCookieTokenAuth

| Field Name | Type | Required | Default | Description |
Expand Down
12 changes: 12 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@
"matchStrings": [
"// renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\n[^\\n]+[A-Za-z0-9_]+?_VERSION\\s*=\\s*\"(?<currentValue>.+?)\";"
]
},
{
"customType": "regex",
"fileMatch": [
"^.github/workflows/.+\\.ya?ml$"
],
"matchStrings": [
"KEYCLOAK_VERSION:\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)"
],
"datasourceTemplate": "docker",
"depNameTemplate": "quay.io/keycloak/keycloak",
"versioningTemplate": "semver"
}
]
}

0 comments on commit 35d3194

Please sign in to comment.