Support talking to multiple ORY Hydra deployments (#35)

This commit is contained in:
Paul Davis
2019-11-14 01:11:13 -07:00
committed by hackerman
parent c0bc5dffa5
commit 803c935b47
17 changed files with 404 additions and 51 deletions

View File

@ -400,6 +400,43 @@ spec:
maxItems: 4
minItems: 1
type: array
hydraAdmin:
description: HydraAdmin is the optional configuration to use for managing
this client
properties:
endpoint:
description: Endpoint is the endpoint for the hydra instance on
which to set up the client. This value will override the value
provided to `--endpoint` (defaults to `"/clients"` in the application)
pattern: (^$|^/.*)
type: string
forwardedProto:
description: ForwardedProto overrides the `--forwarded-proto` flag.
The value "off" will force this to be off even if `--forwarded-proto`
is specified
pattern: (^$|https?|off)
type: string
port:
description: Port is the port for the hydra instance on which to
set up the client. This value will override the value provided
to `--hydra-port`
maximum: 65535
type: integer
url:
description: URL is the URL for the hydra instance on which to set
up the client. This value will override the value provided to
`--hydra-url`
maxLength: 64
pattern: (^$|^https?://.*)
type: string
type: object
redirectUris:
description: RedirectURIs is an array of the redirect URIs allowed for
the application
items:
pattern: \w+:/?/?[^\s]+
type: string
type: array
responseTypes:
description: ResponseTypes is an array of the OAuth 2.0 response type
strings that the client can use at the authorization endpoint.

View File

@ -8,5 +8,5 @@ spec:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: controller:latest
- image: dangersalad/hydra-maester:v0.0.5-alpha15
name: manager

View File

@ -13,5 +13,20 @@ spec:
- id_token
- code
- token
redirectUris:
- https://client/account
- http://localhost:8080
scope: "read write"
secretName: my-secret-123
# these are optional
redirectUris:
- https://client/account
- http://localhost:8080
hydraAdmin:
# if hydraAdmin is specified, all of these fields are requried,
# but they can be empty/0
url: http://hydra-admin.namespace.cluster.domain
port: 4445
endpoint: /clients
forwardedProto: https

View File

@ -8,7 +8,7 @@ data:
client_id: MDA5MDA5MDA=
client_secret: czNjUjM3cDRzc1ZWMHJEMTIzNA==
---
apiVersion: hydra.ory.sh/v1alpha1
apiVersion: hydra.ory.sh/v1alpha2
kind: OAuth2Client
metadata:
name: my-oauth2-client-2
@ -25,3 +25,14 @@ spec:
- token
scope: "read write"
secretName: my-secret-456
# these are optional
redirectUris:
- https://client/account
- http://localhost:8080
hydraAdmin:
# if hydraAdmin is specified, all of these fields are requried,
# but they can be empty/0
url: http://hydra-admin.namespace.cluster.domain
port: 4445
endpoint: /clients
forwardedProto: https