googleapis / googleapis/google-cloud-java

[google-auth-library-java] Add support for JCA Provider to ServiceAccountCredentials

オープン
#12,613 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
type: feature request
主要言語
Java
スター
2.1k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
154

説明

The current API for ServiceAccountCredentials does not support explicitly setting a Provider. (This is true for all Credentials implementing ServiceAccountSigner, but changing it consistently for all these should also incorporate changes to com.google.api.client.json.webtoken.JsonWebSignature in my opinion).

The current behaviour relies on JCA to always yield the correct provider for java.security.Signature regardless of how the key is stored. When the key is stored in a KeyVault or on a HSM this assumption fails. This is a design limitation in the JCA and requires the use of explicit providers.

I have a patch that fixes the issue for ServiceAccountCredentials, and suggest that similar work is done on the other GoogleCredentials implementations.

#### Environment details

- OS: All
- Java version: 1+
- google-auth-library-java version(s): All versions before 0a57cd56cca2af41e8e4645302ca602aab10be4e

#### Steps to reproduce

1. Add another JCA provider providing the "RSAwithSHA256" signature algorithm to the stack bottom of the stack.
2. Create an opaque private key.
3. Use this key for signing the authentication assertions.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。