Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Authorization server behind Zuul #94

Closed
kakawait opened this issue Apr 7, 2016 · 2 comments
Closed

Authorization server behind Zuul #94

kakawait opened this issue Apr 7, 2016 · 2 comments

Comments

@kakawait
Copy link

kakawait commented Apr 7, 2016

I would be able to set my AuthorizationServer behind Zuul for multiple purposes (see below).

It's actually possible without changes POC https://github.com/kakawait/uaa-behind-zuul-sample but some tricks to do.

Enjoy Zuul/Ribbon load balancing for HA AuthorizationServer

AuthorizationServer for fully authenticated app is kind of SPOF, so it's important to replicate instances for HA. Instead of using it own load balancing why not using Zuul like following architecture

uaa behind zuul

Do not expose AuthorizationServer on web

I would Zuul to be the only entry point of my application like previous architecture

Portable configuration

Related to spring-attic/spring-security-oauth#671

Idea is to avoid any absolute URLs on following (at least) properties:

  • security.oauth2.client.accessTokenUri
  • security.oauth2.client.userAuthorizationUri

Using path for security.oauth2.client.userAuthorizationUri?
Using service-registry for security.oauth2.client.accessTokenUri?

Thus

security:
  oauth2:
    client:
      accessTokenUri: http://localhost:9999/uaa/oauth/token
      userAuthorizationUri: http://localhost:9999/uaa/oauth/token

should becomes

security:
  oauth2:
    client:
      accessTokenUri: http://uaa-service/uaa/oauth/token
      userAuthorizationUri: /uaa/oauth/token

zuul:
  routes:
    uaa-service:
      sensitiveHeaders:
      path: /uaa/**
@hwildwood
Copy link

👍

@spencergibb
Copy link
Contributor

Closing this due to inactivity. Please re-open if there's more to discuss.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants