例如在默認jhipster UAA配置有:spring-security-oauth2 authorizedGrantTypes的配置在實踐中意味着什麼?
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雲(客戶端和祕密硬編碼配置)上以允許通過網關進行任何外部身份驗證,則看起來很糟糕。如何防止這一點?