keycardai-oauth 0.15.1 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b094722fda3937a5c428749976362c4b6b6fe64675d7cc28fd2a4855111816d9
|
|
4
|
+
data.tar.gz: eb6d7d3536c0cc71287e843ad0e1f135d797deb0345f6e0d21613a0709f9cb92
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8aff3ed02700382c383616189b2427ff9862d7b1dd9d4ba3be06e0424aaf67ad260d58c57a100e52c51ac02d8bbedefdc8aa25b92980f083f6298ba0807faa17
|
|
7
|
+
data.tar.gz: be238c65b54d8d7592a1727340272aeb075385b007bc904f03d4b59a6949215e93e1452a0a499c7ba097d3a7e2f41b233cb3948a7056d3ffb57d591e5401d0b0
|
data/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,26 @@ the loopback flow (RFC 8252), JWT signing and verification with a caching JWKS
|
|
|
15
15
|
keyring, the three application credentials (ClientSecret with multi-zone,
|
|
16
16
|
WebIdentity, WorkloadIdentity with pluggable token sources), and AccessContext.
|
|
17
17
|
|
|
18
|
+
## 0.16.1-keycardai-oauth (2026-11-26)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
- fix(keycardai-oauth): attach KEYCARD_CLIENT_ID to a discovered web identity credential (#125)
|
|
22
|
+
- * fix(keycardai-oauth): attach KEYCARD_CLIENT_ID to a discovered web identity credential
|
|
23
|
+
- Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
|
24
|
+
- * docs: update credential discovery conformance counts for rows 23 and 24
|
|
25
|
+
- Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
|
26
|
+
- ---------
|
|
27
|
+
- Co-authored-by: devin-ai-keycard <devin-ai@keycard.ai>
|
|
28
|
+
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
|
29
|
+
Co-authored-by: Larry Osakwe <23560354+Larry-Osakwe@users.noreply.github.com>
|
|
30
|
+
|
|
31
|
+
## 0.16.0-keycardai-oauth (2026-11-26)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
- fix(keycardai-oauth)!: a credential without client authentication is a configuration error (SDK-170) (#119)
|
|
35
|
+
- Refs SDK-170
|
|
36
|
+
- BREAKING CHANGE: custom credentials that only define authorization_header now raise ConfigurationError at ClientCredentialsClient construction, so add client_authentication to them.
|
|
37
|
+
|
|
18
38
|
## 0.15.1-keycardai-oauth (2026-11-26)
|
|
19
39
|
|
|
20
40
|
|
data/README.md
CHANGED
|
@@ -47,8 +47,8 @@ Set `KEYCARD_APPLICATION_CREDENTIAL_TYPE` to `client_secret`,
|
|
|
47
47
|
configured. `eks_workload_identity` is a deprecated alias for
|
|
48
48
|
`workload_identity`. Selecting `web_identity` without a storage directory uses
|
|
49
49
|
the WebIdentity default, and `web_identity_server_name:` supplies its key name.
|
|
50
|
-
A discovered WebIdentity
|
|
51
|
-
|
|
50
|
+
A discovered WebIdentity uses a non-empty `KEYCARD_CLIENT_ID` as its registered
|
|
51
|
+
client id. Discovery succeeds without it, but client authentication requires it.
|
|
52
52
|
|
|
53
53
|
Discovery configuration errors raise `Keycardai::OAuth::CredentialDiscoveryError`
|
|
54
54
|
with a symbolic `reason` and a `resolvable` list. Pass the zone URL separately;
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
module Keycardai
|
|
4
4
|
module OAuth
|
|
5
5
|
# The headers and form fields that authenticate a client on one request
|
|
6
|
-
# to the authorization server. A credential
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
6
|
+
# to the authorization server. A credential returns it from
|
|
7
|
+
# client_authentication(issuer:, endpoint:).
|
|
8
|
+
#
|
|
9
|
+
# Credentials used with ClientCredentialsClient must implement this method.
|
|
10
|
+
# It is also required when a credential is used for device authorization,
|
|
11
|
+
# authorization code exchange with PKCE, token refresh, or token revocation.
|
|
10
12
|
#
|
|
11
13
|
# It never includes a grant parameter such as grant_type or
|
|
12
14
|
# subject_token_type. The caller merges it into its own request.
|
|
@@ -14,7 +14,7 @@ module Keycardai
|
|
|
14
14
|
include TokenRequests
|
|
15
15
|
|
|
16
16
|
# @param issuer [String] the zone's issuer URL
|
|
17
|
-
# @param credential [
|
|
17
|
+
# @param credential [#client_authentication, nil] provides client authentication;
|
|
18
18
|
# exclusive with client_id/client_secret
|
|
19
19
|
# @param client_id [String, nil] shared-secret client id (HTTP Basic)
|
|
20
20
|
# @param client_secret [String, nil] shared-secret client secret;
|
|
@@ -24,13 +24,17 @@ module Keycardai
|
|
|
24
24
|
# @param discovery_ttl [Numeric] token-endpoint cache lifetime in seconds
|
|
25
25
|
# @param clock [#call] returns the current Time; override in tests
|
|
26
26
|
# @raise [ConfigurationError] when only one of client_id/client_secret is
|
|
27
|
-
# given,
|
|
27
|
+
# given, a credential is combined with a raw pair, or the credential
|
|
28
|
+
# does not provide client authentication
|
|
28
29
|
def initialize(issuer:, credential: nil, client_id: nil, client_secret: nil,
|
|
29
30
|
http_client: HTTP::NetHTTPClient.new, timeout: nil,
|
|
30
31
|
discovery_ttl: TokenRequests::DEFAULT_DISCOVERY_TTL, clock: MetadataRetry::WALL_CLOCK)
|
|
31
32
|
initialize_token_client(issuer: issuer, credential: credential, client_id: client_id,
|
|
32
33
|
client_secret: client_secret, http_client: http_client, timeout: timeout,
|
|
33
34
|
discovery_ttl: discovery_ttl, clock: clock)
|
|
35
|
+
return unless credential && !credential.respond_to?(:client_authentication)
|
|
36
|
+
|
|
37
|
+
raise ConfigurationError, "#{credential.class} does not provide client authentication"
|
|
34
38
|
end
|
|
35
39
|
|
|
36
40
|
# Request a token for the client itself.
|
|
@@ -70,9 +74,7 @@ module Keycardai
|
|
|
70
74
|
end
|
|
71
75
|
# A ClientSecret resolves its Basic header without the token endpoint,
|
|
72
76
|
# so an unconfigured zone fails before any discovery request.
|
|
73
|
-
if @credential.is_a?(ClientSecret)
|
|
74
|
-
return post_with_header(params, issuer)
|
|
75
|
-
end
|
|
77
|
+
return post_with_header(params, issuer) if @credential.is_a?(ClientSecret)
|
|
76
78
|
|
|
77
79
|
post_authenticated_credentials(params, issuer)
|
|
78
80
|
end
|
|
@@ -41,7 +41,7 @@ module Keycardai
|
|
|
41
41
|
when "workload_identity"
|
|
42
42
|
WorkloadIdentity.new(source: FileTokenSource.new(token_file_path: @token_file), client_id: @client_id)
|
|
43
43
|
when "web_identity"
|
|
44
|
-
WebIdentity.new(server_name: web_identity_server_name, storage_dir: @storage_dir)
|
|
44
|
+
WebIdentity.new(server_name: web_identity_server_name, storage_dir: @storage_dir, client_id: @client_id)
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|