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

Challenge claims redirect http instead of https #455

Closed
ahillman3 opened this issue May 10, 2017 · 13 comments
Closed

Challenge claims redirect http instead of https #455

ahillman3 opened this issue May 10, 2017 · 13 comments

Comments

@ahillman3
Copy link

I'm trying to create an OAuth2 process flow using hydra as my OAuth2 server. I have it setup within Kubernetes running in Amazon, wth http.

I have added an SSL certificate to the load balancer, and added a DNS entry to Route53 to provide a public FQDN matching the certificate.

I don't see any issues with invalid certificate errors, but when I ask for a challenge response the redirect value in the claim has http instead of https.

This makes completing the process flow difficult, as redirects don't work.

Any ideas, or more info needed?

@aeneasr
Copy link
Member

aeneasr commented May 10, 2017

Definitely more info needed. What docker image are you running, what environment variables are set (don't include secrets)?

@ahillman3
Copy link
Author

ahillman3 commented May 10, 2017

My docker image is built from the most recent code as of yesterday.
Environment variables:
SYSTEM_SECRET: ******
DATABASE_URL: mysql://:@tcp(xxx.xxx.xxx.xxx:3306)/hydra?parseTime=true
FORCE_ROOT_CLIENT_CREDENTIALS: :
AUTHORIZE_CODE_LIFESPAN: 10m
AUTH_CODE_LIFESPAN: 10m
ID_TOKEN_LIFESPAN:8760h
ACCESS_TOKEN_LIFESPAN: 8760h
CHALLENGE_TOKEN_LIFESPAN: 10m
CONSENT_URL: https://ad6c1aff82f3411e7899506d9bf1932f-844480084.us-west-2.elb.amazonaws.com:8081/consent
PROFILING: cpu

The consent url is not currently working, but I'm not having a problem with that.

@aeneasr
Copy link
Member

aeneasr commented May 10, 2017

Which docker image are you using exactly? There are multiple flavors!

@aeneasr
Copy link
Member

aeneasr commented May 10, 2017

Oh I misread, seems like you're building it yourself. Which docker image are you using?

@ahillman3
Copy link
Author

Ahh.

Docker-http

@aeneasr
Copy link
Member

aeneasr commented May 10, 2017

Ok, that one has https disabled, use the normal one for https - does that answer your question?

@ahillman3
Copy link
Author

Will that still work if I have it running without https in kubernetes? I like having the certificate outside kubernetes.

@aeneasr
Copy link
Member

aeneasr commented May 10, 2017

Have you seen the TLS termination option? If not, check out hydra help host and look under the "HTTPS CONTROLS" section. That should be what you're looking for

@ahillman3
Copy link
Author

I'll look. Thanks.

@aeneasr
Copy link
Member

aeneasr commented May 10, 2017

otherwise you could probably also issue a certificate from the platform you're using for hydra, use that in hydra and serve regular https. that usually works too for e.g. AWS ELB - should also work on GCP

@ahillman3
Copy link
Author

I'll look into that as well.

@aeneasr
Copy link
Member

aeneasr commented May 10, 2017

also head over to our community channel on gitter (link in readme), the community is really helpful and has dealt with this as well :)

closing this issue, if you feel there's a bug or something please reopen or create a new issue

@aeneasr aeneasr closed this as completed May 10, 2017
@ahillman3
Copy link
Author

Thanks.

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

No branches or pull requests

2 participants