小编Cos*_*sta的帖子

spring-security-oauth2 authorizedGrantTypes的配置在实践中意味着什么?

例如,在默认的jhipster UAA配置中,我们有:

clients.inMemory() .withClient("web_app") .scopes("openid") .autoApprove(true) .authorizedGrantTypes("implicit","refresh_token", "password", "authorization_code") .and() .withClient(jHipsterProperties.getSecurity() .getClientAuthorization().getClientId()) .secret(jHipsterProperties.getSecurity() .getClientAuthorization().getClientSecret()) .scopes("web-app") .autoApprove(true) .authorizedGrantTypes("client_credentials");

那么"authorizedGrantTypes"在实践中真正意味着什么呢?第一个客户端"web_app"将具有不同的类型,包括刷新,因此第二个客户端将能够生成令牌作为client_credentials.有什么不同?

另一个问题,使用"client_credentials"的第二个客户端身份验证的目的是什么?由于这与存储的真实用户断开连接.微服务到微服务通信?如果配置部署在Spring云(客户端和秘密硬编码配置)上以允许通过网关进行任何外部身份验证,那么看起来很糟糕.怎么预防这个?

spring spring-boot spring-security-oauth2 jhipster

8
推荐指数
1
解决办法
6455
查看次数