Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added configuration for TLS enabled hydra admin services #636

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

dwilson1988
Copy link
Contributor

@dwilson1988 dwilson1988 commented Aug 23, 2023

This pull request adds the ability to configure hydra-maester to point to a hydra admin endpoint that has TLS enabled. Previous to this PR, "http" was hard-coded in the admin host, causing HTTP 400 responses when talking to a hydra admin endpoint with TLS enabled. Furthermore, this PR adds the ability to add volume/volumeMounts to the deployment to add CA certs.

This simply adds in a few missing command line options from hydra-maester.

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

@dwilson1988 dwilson1988 changed the title added configuration for TLS enabled hydra admin services feat: added configuration for TLS enabled hydra admin services Aug 23, 2023
Copy link
Collaborator

@Demonsthere Demonsthere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there!
Good catch, hardcoded is almost always bad :D
Just a few general remarks from my side :)

helm/charts/hydra-maester/templates/deployment.yaml Outdated Show resolved Hide resolved
helm/charts/hydra-maester/values.yaml Outdated Show resolved Hide resolved
helm/charts/hydra-maester/values.yaml Outdated Show resolved Hide resolved
helm/charts/hydra-maester/values.yaml Outdated Show resolved Hide resolved
helm/charts/hydra-maester/values.yaml Show resolved Hide resolved
* move defaults to values.yaml
* add test volume/volumeMounts
@dwilson1988
Copy link
Contributor Author

Hi there! Good catch, hardcoded is almost always bad :D Just a few general remarks from my side :)

Thanks for the review! I've made the requested changes, let me know if there's anything else you'd like me to change!

Copy link
Collaborator

@Demonsthere Demonsthere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :) 2 extra comments, but not required in order to merge

@@ -32,6 +32,12 @@ adminService:
# -- Set the clients endpoint, should be `/clients` for Hydra 1.x and
# `/admin/clients` for Hydra 2.x
endpoint: /admin/clients
# -- Scheme used by Hydra client endpoint. May be "http" or "https"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we also could use fail and an if in the code to verify if the scheme is http or https, but on the other hand it is the users responsibility to provide sane overrides 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a little block to the top of deployment.yaml. Hopefully this works for you?

@@ -48,7 +52,7 @@ spec:
- /manager
args:
- --metrics-addr=127.0.0.1:8080
- --hydra-url=http://{{ .Values.adminService.name | default ( include "hydra-maester.adminService" . ) }}
- --hydra-url={{ .Values.adminService.scheme }}://{{ .Values.adminService.name | default ( include "hydra-maester.adminService" . ) }}
- --hydra-port={{ .Values.adminService.port | default 4445 }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just noticed this, could you move the port to values.yaml too?
For name we leave it empty as we want to compute the field

@Demonsthere Demonsthere merged commit 921b31a into ory:master Aug 24, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants