Skip to content

Align discovery authentication with #258 - #276

Open
Mehrn0ush wants to merge 3 commits into
CycloneDX:mainfrom
Mehrn0ush:docs/align-discovery-auth-with-258
Open

Mehrn0ush wants to merge 3 commits into
CycloneDX:mainfrom
Mehrn0ush:docs/align-discovery-auth-with-258

Conversation

@Mehrn0ush

Copy link
Copy Markdown
Contributor

Summary

  • Align discovery/readme.md with the feat: token exchange endpoint and documentation #258 auth model: separately provisioned credentials (e.g. API key) → /token, not credentials in the TEI
  • Clarify TLS verification, 401 / invalid_token one-shot recovery (MAY), no failover solely on 401/403, and that auth failures MUST NOT be reported as “no updates”
  • Failover selects the next untried version-compatible endpoint; clients SHALL bound total discovery attempts (with exponential backoff)
    Closes Auth issues #275.

Notes

  • Intentionally leaves URN/URL encoding work to Updating discovery to use TEI: URL #261
  • The new SHALL on limiting total discovery attempts strengthens prior SHOULD-style retry guidance — please confirm that bound is acceptable

Comment thread discovery/readme.md
credentials for the selected TEA service, such as an API key) and have the platform
access the required artefacts in a highly automated fashion. Those credentials are
provisioned separately and are not embedded in the TEI.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TEI is now URL.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch is based on current main (still URN). I’d like to keep this PR’s wording TEI-neutral and leave the URN→URL migration to #261 so we don’t mix scopes — does that work for you?

Comment thread discovery/readme.md Outdated

How this is communicated to the client users is implementation specific.
the discovery endpoint fails with a 5xx error code, or TLS certificate validation fails,
the client MUST select the next untried endpoint that supports a compatible API

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MUST is not the right word, we need to use SHALL (ISO vocabulary).

Comment thread discovery/readme.md Outdated
### TLS Encryption

The .well-known endpoint must only be available via HTTPS. Using unencrypted HTTP is not valid.
The `.well-known` endpoint must only be available via HTTPS. Using unencrypted HTTP is not

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remaining must -> SHELL here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks,
fixed.

Comment thread discovery/readme.md Outdated
the client SHALL select the next untried endpoint that supports a compatible API
version, if one is available. While doing so the client SHOULD preserve the priority
order if provided (from highest to lowest priority). Each failover connection is subject
to the same TLS verification requirement. Clients SHALL limit the total number of

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHALL -> SHOULD here, SHALL needs more substance

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread discovery/readme.md Outdated
A protected TEA resource endpoint (excluding `/token`) SHALL respond to a request without
valid authentication with `401 Unauthorized` and a `WWW-Authenticate: Bearer` challenge.
When that challenge contains `error="invalid_token"`, the client MAY obtain a replacement
access token from the same service and retry the original request once (RFC 6750

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude tells me RFC citation is wrong here, as it defines error codes, not retry behaviour.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed the citation should not imply RFC 6750 specifies our one-shot policy. section 3.1 does define invalid_token and allows MAY request a new token and retry; the “once / same service / not refresh” limits are TEA. Updated the sentence accordingly.

Comment thread discovery/readme.md Outdated
Clients must pick any one of the endpoints listed in the `.well-known/tea` json
response. The client MUST pick an endpoint with the at least one version that is
supported by the client is using. The client MUST prioritize endpoints with the
response. The client SHALL pick an endpoint with the at least one version that is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is garbled "with the at least..."

@Mehrn0ush

Copy link
Copy Markdown
Contributor Author

Thanks — pushed a follow-up addressing:

  1. Remaining mustshall (TLS + other leftovers)
  2. Discovery attempt bound: SHALLSHOULD
  3. RFC 6750 section 3.1 only for invalid_token; one-shot retry as TEA MAY
  4. Reworded the garbled “with the at least…” sentence

@taleodor

Copy link
Copy Markdown
Contributor

I believe it's good now, should be merged after #261.

@oej

oej commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

#261 is merged so this needs to be updated for merge :-)

Clarify credentials vs TEI, TLS verification, Bearer invalid_token
recovery, and that auth failures are not "no updates". Tighten
version-compatible failover and bounded discovery retries. Fixes CycloneDX#275.

Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
Replace leftover must with shall, fix garbled endpoint selection
prose, soften discovery attempt bound to SHOULD, and attribute
RFC 6750 section 3.1 to invalid_token only (retry remains TEA MAY).

Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
@Mehrn0ush
Mehrn0ush force-pushed the docs/align-discovery-auth-with-258 branch from e7529ad to 84c193e Compare September 16, 2026 08:07
@Mehrn0ush

Copy link
Copy Markdown
Contributor Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auth issues

3 participants