Add OAuth client_credentials support for terminology server authentication#1270
Add OAuth client_credentials support for terminology server authentication#1270dionmcm wants to merge 4 commits intoHL7:masterfrom
Conversation
|
I don't understand why these are added as CLI parameters? And what's the point of -devtx? |
In part for consistency because the IG Publisher is already configured via CLI params like -tx but I can't imagine many people running the publisher manually will want to specify the client credentials and token URL on the command line over the config file. But the IG Publisher is often run from CI pipelines and CLI params make it easy to inject credentials from pipeline secrets without touching config files. So this is the main use case.
I did it just out of an attempt at consistency, I was trying to ensure any possible URL was associated with the credentials because the TX URL can come from a few places. But realistically the -devtx is a static URL which is always open - so I removed that. |
dotasek
left a comment
There was a problem hiding this comment.
This PR requires changes included in hapifhir/org.hl7.fhir.core#2348
However, that PR is not in a mergable state. Until that is resolved, this PR can't be approved either.
Purpose
The IG Publisher currently only supports authentication with terminology servers via a static OAuth token passed into the process. Users whose security policies enforce short token expiry (e.g. 30 minutes) find that the token expires before the publisher finishes, causing build failures. This PR addresses that by allowing configuration of OAuth 2.0 client_credentials flow directly, so the publisher can automatically acquire and refresh tokens as needed.
Depends on hapifhir/org.hl7.fhir.core#2348 in org.hl7.fhir.core, which the IG Publisher uses to perform FHIR operations on the terminology server.
Summary
-tx-client-id,-tx-client-secret,-tx-token-endpoint) to authenticate with FHIR terminology servers using OAuth 2.0 client_credentials grantmakeSecureRef()and supports-devtxfallback when-txis absentremovePassword()in bothPublisherandPublicationProcessto mask-tx-client-secretvalues in log outputTest plan
-tx-client-id,-tx-client-secret,-tx-token-endpointagainst an OAuth-protected TX server