Skip to content

Commit

Permalink
beta_ prefix token introspection
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Koch committed Mar 20, 2023
1 parent 101cc78 commit 86776e0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/ac_jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type JWT struct {
Cookie string `hcl:"cookie,optional" docs:"Read token value from a cookie. Cannot be used together with {bearer}, {header} or {token_value}"`
DisablePrivateCaching bool `hcl:"disable_private_caching,optional" docs:"If set to {true}, Couper does not add the {private} directive to the {Cache-Control} HTTP header field value."`
Header string `hcl:"header,optional" docs:"Read token value from the given request header field. Implies {Bearer} if {Authorization} (case-insensitive) is used (deprecated!), otherwise any other header name can be used. Cannot be used together with {bearer}, {cookie} or {token_value}."`
Introspection *Introspection `hcl:"introspection,block" docs:"Configures a [client for OAuth2 token introspection](/configuration/block/introspection)."`
Introspection *Introspection `hcl:"beta_introspection,block" docs:"Configures a [client for OAuth2 token introspection](/configuration/block/introspection)."`
JWKsURL string `hcl:"jwks_url,optional" docs:"URI pointing to a set of [JSON Web Keys (RFC 7517)](https://datatracker.ietf.org/doc/html/rfc7517)"`
JWKsTTL string `hcl:"jwks_ttl,optional" docs:"Time period the JWK set stays valid and may be cached." type:"duration" default:"1h"`
JWKsMaxStale string `hcl:"jwks_max_stale,optional" docs:"Time period the cached JWK set stays valid after its TTL has passed." type:"duration" default:"1h"`
Expand Down
8 changes: 4 additions & 4 deletions docs/website/content/2.configuration/4.block/introspection.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Token Introspection
# Token Introspection (Beta)

The `introspection` block lets you configure OAuth2 token introspection for an encapsulating `jwt` block.

| Block name | Context | Label |
|:----------------|:--------------------------------------|:---------|
| `introspection` | [JWT Block](/configuration/block/jwt) | no label |
| Block name | Context | Label |
|:---------------------|:--------------------------------------|:---------|
| `beta_introspection` | [JWT Block](/configuration/block/jwt) | no label |

::attributes
---
Expand Down
8 changes: 4 additions & 4 deletions docs/website/content/2.configuration/4.block/jwt.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ values: [
"name": "backend"
},
{
"description": "Configures an [error handler](/configuration/block/error_handler) (zero or more).",
"name": "error_handler"
"description": "Configures a [client for OAuth2 token introspection](/configuration/block/introspection).",
"name": "beta_introspection"
},
{
"description": "Configures a [client for OAuth2 token introspection](/configuration/block/introspection).",
"name": "introspection"
"description": "Configures an [error handler](/configuration/block/error_handler) (zero or more).",
"name": "error_handler"
}
]

Expand Down
2 changes: 1 addition & 1 deletion server/testdata/oauth2/25_couper.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ definitions {
key = "asdf"
signing_ttl = "60s"

introspection {
beta_introspection {
endpoint = "{{.asOrigin}}/introspect"
ttl = "{{.ttl}}"
client_id = "the_rs"
Expand Down
8 changes: 4 additions & 4 deletions server/testdata/oauth2/26_couper.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ definitions {
signature_algorithm = "HS256"
key = "asdf"

introspection {
beta_introspection {
endpoint = "http://1.1.1.1:9999/introspect/csb"
ttl = "0s"
client_id = "the_rs"
Expand All @@ -54,7 +54,7 @@ definitions {
signature_algorithm = "HS256"
key = "asdf"

introspection {
beta_introspection {
endpoint = "http://1.1.1.1:9999/introspect/csp"
endpoint_auth_method = "client_secret_post"
ttl = "0s"
Expand All @@ -67,7 +67,7 @@ definitions {
signature_algorithm = "HS256"
key = "asdf"

introspection {
beta_introspection {
endpoint = "http://1.1.1.1:9999/introspect/csj"
endpoint_auth_method = "client_secret_jwt"
ttl = "0s"
Expand All @@ -85,7 +85,7 @@ definitions {
signature_algorithm = "HS256"
key = "asdf"

introspection {
beta_introspection {
endpoint = "http://1.1.1.1:9999/introspect/pkj"
endpoint_auth_method = "private_key_jwt"
ttl = "0s"
Expand Down

0 comments on commit 86776e0

Please sign in to comment.