Coder Social home page Coder Social logo

Comments (6)

dsyer avatar dsyer commented on May 28, 2024

That's not currently supported with the @Enable* annotations (so you'd have to pull in the various bits that they do yourself). What do you need your custom token services to do?

from spring-cloud-security.

NickPadilla avatar NickPadilla commented on May 28, 2024

Hey @dsyer - I appreciate your response! Yeah, so I guess I am not missing anything this time! As the integration with Keycloak has advanced, we realized that having Keycloak verify/decode the access tokens was the most secure route to go. However it looks like the verify/decode endpoint is a GET not POST. So providing a custom RemoteTokenService would be the way to go.

from spring-cloud-security.

jesse-russell avatar jesse-russell commented on May 28, 2024

I'm actually having the same issue with ForgeRock's OpenAM right now. Any progress on this feature?

from spring-cloud-security.

dsyer avatar dsyer commented on May 28, 2024

These features moved to Spring Boot. If you need anything please open tickets there now (it looks to me like you can probably add a @Bean of type ResourceServerTokenServices to override though).

from spring-cloud-security.

levik666 avatar levik666 commented on May 28, 2024

Hi @dsyer

I understand that we could implement ResourceServerTokenServices. However what value we exposed to decouple RemoteTokenServices and we could extend it (make some method protected not private).

For instance, I have error when I call (private method postForMap on RemoteTokenServices#143)

restTemplate.exchange(path, HttpMethod.POST,
				new HttpEntity<MultiValueMap<String, String>>(formData, headers), Map.class)

and without try catch, I don't get responseBody. In addition to that, I could override DefaultResponseErrorHandler I don't get the information from it.

try {
            return restTemplate.exchange(path, HttpMethod.POST,
                            new HttpEntity<>(formData, headers), Map.class).getBody();
        } catch (RestClientException exe) {
            if (exe instanceof HttpClientErrorException) {
                String responseBodyAsString = ((HttpClientErrorException) exe).getResponseBodyAsString();
                logger.error("Can't path " +  path + " responseBodyAsString " + responseBodyAsString);
            }
            throw exe;
        }

Could you please explain why we have such protection in this service, or maybe I miss something?

I'll be really appreciated for any clarification

Thanks,

from spring-cloud-security.

dsyer avatar dsyer commented on May 28, 2024

This issue is closed. Read the comments (e.g. "These features moved to Spring Boot.").

from spring-cloud-security.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.