[Feature]: Credential/auth model (tokens, proxies, delegation)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- authentication, backend, security
Research direction
Start with docs/adr/IC-ADR-003_credentials.md and review its open issues and Draft → Accepted path alongside ADR-001/002. Then inspect SiteDirector._setCredentials, WMSUtilities.setPilotCredentials, AREX delegation methods, and HTCondorCE token injection, followed by the Transport protocol from issue #07. Done means the ADR is accepted, intercede.auth types are unit-tested, backend config expresses token-versus-proxy selection without Tag strings, and the ADR-002 auth config path is named.
Written by the indexing model from the issue text.
Description
User Story
As a backend implementer and as the WMS consumer,
I want a decided credential model — how tokens and X.509 proxies are supplied to backends, renewed,
and scoped —
So that the ARC and HTCondor-CE backends can land without re-inventing DIRAC's setProxy/setToken
/Tag: Token conventions ad hoc.
Feature Description
A draft IC-ADR-003 now exists (docs/adr/IC-ADR-003_credentials.md, riding in PR #4 with the
other ADRs; this issue's implementation goes in a follow-up PR based on it): typed
immutable credentials (BearerToken/X509Proxy grouped in a CredentialSet), backend-declared
CredentialRequirements (kinds + audience + scopes — replaces Tag: Token[:vo] and
audienceName), and provider-based supply (CredentialProvider.get(requirements) — backend pulls
when near expiry; issuance/renewal policy stays consumer-side). This issue is: review/decide the
draft, then implement the intercede.auth types. The decision space it fixes:
- Supply: static credential objects vs a provider callback (today: caller calls
setProxy/setTokenbefore each cycle and inspectsproxy.getRemainingSecs()itself —
caller-driven renewal is the incumbent model and probably right for a stateless library). - Declaration: how a backend/transport declares which credential kinds it accepts — replaces
DIRAC'sTag: Token[:vo]CS hack as the opt-in signal. - Audience/scoping: typed replacement for
ce.audienceName(ARC:https://<ce>:<port>;
HTCondor-CE:<ce>:9619) so the caller can mint correctly-scoped tokens. - Materialisation helpers (Tier C): write-token-to-file, write-proxy-to-file +
X509_USER_PROXY-style env injection for CLI-driven backends. - ARC delegation (the hard case): create/sign/renew proxy delegations via CSR — decide whether
this isARCBackend-internal (Tier C) or a reusable piece. - Boundary statement: payload credential renewal (DIRAC
_monitorProxy) is pilot-side, out
of scope — only backend auth is interCEde's.
Definition of Done
- IC-ADR-003 reviewed and merged (draft already written; Draft → Accepted path like
ADR-001/002); its Open Issues (freshness margin, proxy representation/key material,
multi-VO, per-operation requirements) dispositioned -
intercede.authtypes (Tier A) implemented + unit-tested; consumed by theTransport
protocol shape from # - Token-vs-proxy selection expressible in backend config (registry request), no
Tagstrings - Integration hook: ADR-002 auth config axis (
config/token/vsconfig/proxy/per stack)
named as the validation path
Alternatives Considered
- Backend-driven renewal (backend holds a refresh callback and renews itself) — moves policy into
the library and needs long-lived state; contradicts the stateless design. - Keep DIRAC's
Tag: Tokenopt-in — stringly-typed, CS-coupled; rejected.
Additional Context
Evidence: SiteDirector._setCredentials (caller-driven renewal), WMSUtilities.setPilotCredentials
(same logic duplicated), AREX delegation machinery (_prepareDelegation/_renewDelegation),
HTCondorCE _CONDOR_* env-var token injection.
- Dominant language
- Python
- Stars
- 3
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DIRACGrid/intercede
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in DIRACGrid/intercede
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100