Why zuul proxy dont relay oauth2 token?Spring OAuth Authorization Server behind Spring Cloud Zuul ProxySpring Boot + Cloud | Zuul Proxy | Append a URL/rewriteHow to retrieve scopes from OAuth token within Spring boot SSO + zuulSpring Cloud + Zuul + JWT for Value/Reference Tokenszuul : Bearer authentication not acceptedConfiguring Proxy setup with Spring Security OAuth2RestTemplateEnabling zuul retry breaks Eureka routing on PCFHow to integrate Spring Security OAuth2 with Zuul proxy?Spring Boot 2.0 / OAuth2 / JWT / Zuul / MicroservicesImplementing authentication and authorization using Zuul Proxy, Oauth2 on REST Microservices

555 timer FM transmitter

What happens to Mjolnir (Thor's hammer) at the end of Endgame?

Is there a way to generate a list of distinct numbers such that no two subsets ever have an equal sum?

Should the Death Curse affect an undead PC in the Tomb of Annihilation adventure?

What's the polite way to say "I need to urinate"?

How to display Aura JS Errors Lightning Out

Function pointer with named arguments?

Two field separators (colon and space) in awk

How to pronounce 'c++' in Spanish

How come there are so many candidates for the 2020 Democratic party presidential nomination?

Get consecutive integer number ranges from list of int

Classification of surfaces

How to not starve gigantic beasts

Extension of 2-adic valuation to the real numbers

Checks user level and limit the data before saving it to mongoDB

Multiple options vs single option UI

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

If a planet has 3 moons, is it possible to have triple Full/New Moons at once?

acheter à, to mean both "from" and "for"?

Check if a string is entirely made of the same substring

How could Tony Stark make this in Endgame?

What are the characteristics of a typeless programming language?

How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?

Critique of timeline aesthetic



Why zuul proxy dont relay oauth2 token?


Spring OAuth Authorization Server behind Spring Cloud Zuul ProxySpring Boot + Cloud | Zuul Proxy | Append a URL/rewriteHow to retrieve scopes from OAuth token within Spring boot SSO + zuulSpring Cloud + Zuul + JWT for Value/Reference Tokenszuul : Bearer authentication not acceptedConfiguring Proxy setup with Spring Security OAuth2RestTemplateEnabling zuul retry breaks Eureka routing on PCFHow to integrate Spring Security OAuth2 with Zuul proxy?Spring Boot 2.0 / OAuth2 / JWT / Zuul / MicroservicesImplementing authentication and authorization using Zuul Proxy, Oauth2 on REST Microservices






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have gateway backed zuul proxy, and service to proxying.
When I try to request to service via gateway I recieve 401. Zuul dont relay token.



Zuul and OAuth2 config



@Configuration
@EnableOAuth2Sso
@EnableZuulProxy
public class LogInConfig extends WebSecurityConfigurerAdapter

@Bean
public OAuth2RestOperations restOperations(OAuth2ProtectedResourceDetails resource, OAuth2ClientContext context)
return new OAuth2RestTemplate(resource, context);





My dependencies:



dependencies 
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-cloud-connectors'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-ribbon'
implementation 'org.springframework.cloud:spring-cloud-starter-oauth2'
implementation 'org.springframework.cloud:spring-cloud-starter-security'
implementation 'org.springframework.session:spring-session-core'
implementation 'javax.xml.bind:jaxb-api'
implementation group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.0.1'
implementation group: 'com.sun.xml.bind', name: 'jaxb-core', version: '2.3.0.1'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'



As you see spring-cloud-starter-security added.










share|improve this question
























  • Have you tried using forwarding headers?

    – Rafiek
    Mar 9 at 9:52











  • I tried to implement ZuulFilter thats put Authorization Header at request to origin. But header not added. Somthing block that header to add. Then I set zuul.ignoreSecurityHeaders=false. Problem still exists.

    – slon slon
    Mar 10 at 12:42

















0















I have gateway backed zuul proxy, and service to proxying.
When I try to request to service via gateway I recieve 401. Zuul dont relay token.



Zuul and OAuth2 config



@Configuration
@EnableOAuth2Sso
@EnableZuulProxy
public class LogInConfig extends WebSecurityConfigurerAdapter

@Bean
public OAuth2RestOperations restOperations(OAuth2ProtectedResourceDetails resource, OAuth2ClientContext context)
return new OAuth2RestTemplate(resource, context);





My dependencies:



dependencies 
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-cloud-connectors'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-ribbon'
implementation 'org.springframework.cloud:spring-cloud-starter-oauth2'
implementation 'org.springframework.cloud:spring-cloud-starter-security'
implementation 'org.springframework.session:spring-session-core'
implementation 'javax.xml.bind:jaxb-api'
implementation group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.0.1'
implementation group: 'com.sun.xml.bind', name: 'jaxb-core', version: '2.3.0.1'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'



As you see spring-cloud-starter-security added.










share|improve this question
























  • Have you tried using forwarding headers?

    – Rafiek
    Mar 9 at 9:52











  • I tried to implement ZuulFilter thats put Authorization Header at request to origin. But header not added. Somthing block that header to add. Then I set zuul.ignoreSecurityHeaders=false. Problem still exists.

    – slon slon
    Mar 10 at 12:42













0












0








0








I have gateway backed zuul proxy, and service to proxying.
When I try to request to service via gateway I recieve 401. Zuul dont relay token.



Zuul and OAuth2 config



@Configuration
@EnableOAuth2Sso
@EnableZuulProxy
public class LogInConfig extends WebSecurityConfigurerAdapter

@Bean
public OAuth2RestOperations restOperations(OAuth2ProtectedResourceDetails resource, OAuth2ClientContext context)
return new OAuth2RestTemplate(resource, context);





My dependencies:



dependencies 
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-cloud-connectors'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-ribbon'
implementation 'org.springframework.cloud:spring-cloud-starter-oauth2'
implementation 'org.springframework.cloud:spring-cloud-starter-security'
implementation 'org.springframework.session:spring-session-core'
implementation 'javax.xml.bind:jaxb-api'
implementation group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.0.1'
implementation group: 'com.sun.xml.bind', name: 'jaxb-core', version: '2.3.0.1'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'



As you see spring-cloud-starter-security added.










share|improve this question
















I have gateway backed zuul proxy, and service to proxying.
When I try to request to service via gateway I recieve 401. Zuul dont relay token.



Zuul and OAuth2 config



@Configuration
@EnableOAuth2Sso
@EnableZuulProxy
public class LogInConfig extends WebSecurityConfigurerAdapter

@Bean
public OAuth2RestOperations restOperations(OAuth2ProtectedResourceDetails resource, OAuth2ClientContext context)
return new OAuth2RestTemplate(resource, context);





My dependencies:



dependencies 
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-cloud-connectors'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-ribbon'
implementation 'org.springframework.cloud:spring-cloud-starter-oauth2'
implementation 'org.springframework.cloud:spring-cloud-starter-security'
implementation 'org.springframework.session:spring-session-core'
implementation 'javax.xml.bind:jaxb-api'
implementation group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.0.1'
implementation group: 'com.sun.xml.bind', name: 'jaxb-core', version: '2.3.0.1'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'



As you see spring-cloud-starter-security added.







spring-boot spring-security oauth-2.0 netflix-zuul






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 9 at 9:09







slon slon

















asked Mar 8 at 11:33









slon slonslon slon

32




32












  • Have you tried using forwarding headers?

    – Rafiek
    Mar 9 at 9:52











  • I tried to implement ZuulFilter thats put Authorization Header at request to origin. But header not added. Somthing block that header to add. Then I set zuul.ignoreSecurityHeaders=false. Problem still exists.

    – slon slon
    Mar 10 at 12:42

















  • Have you tried using forwarding headers?

    – Rafiek
    Mar 9 at 9:52











  • I tried to implement ZuulFilter thats put Authorization Header at request to origin. But header not added. Somthing block that header to add. Then I set zuul.ignoreSecurityHeaders=false. Problem still exists.

    – slon slon
    Mar 10 at 12:42
















Have you tried using forwarding headers?

– Rafiek
Mar 9 at 9:52





Have you tried using forwarding headers?

– Rafiek
Mar 9 at 9:52













I tried to implement ZuulFilter thats put Authorization Header at request to origin. But header not added. Somthing block that header to add. Then I set zuul.ignoreSecurityHeaders=false. Problem still exists.

– slon slon
Mar 10 at 12:42





I tried to implement ZuulFilter thats put Authorization Header at request to origin. But header not added. Somthing block that header to add. Then I set zuul.ignoreSecurityHeaders=false. Problem still exists.

– slon slon
Mar 10 at 12:42












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55062399%2fwhy-zuul-proxy-dont-relay-oauth2-token%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55062399%2fwhy-zuul-proxy-dont-relay-oauth2-token%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко