pvarki / pvarki/python-libpvarki
Amend identification to use linkerd headers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 55m
- Merged PRs (30d)
- 3
Description
User story
As a user of deploy app,
I want to have the service be robust in the way it resolves identity (authentication),
to avoid any issues with impersonation and security.
Acceptance Criteria
Outline what you think are requirements for this story to be considered Completed.
- Code needs to identify whether the caller is a user or service via provenance
@dataclass(frozen=True)
class ClientIdentity:
kind: Literal["user", "service"] # from PROVENANCE (which channel), which is CA-locked
common_name: str
def resolve_identity(request) -> ClientIdentity | None
# l5d present & == trusted ingress (Traefik) -> user; cn = X-ClientCert-DN CN
# l5d present & != ingress -> service; cn = l5d value
# l5d absent -> REJECT (fail closed)
- Each integration using python-libpvarki needs to have (in https://github.com/pvarki/opendefence-platform)
MTLS_REQUIRE_L5D=trueMTLS_TRUSTED_INGRESS_IDENTITIES=traefik.traefik-system.serviceaccount.identity.linkerd.cluster.local
Linked things
Link epics, features and other user stories here, if applicable.
https://pvarki.getoutline.com/doc/rasenmaeher-api-trustidentity-audit-OpE3XR3jBm
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by locating identity resolution and mTLS configuration in python-libpvarki, then inspect the integrations in opendefence-platform. Use the provided ClientIdentity and resolve_identity requirements as the behavior to verify, and confirm each integration has the two specified environment settings before considering the work done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, python
- Domain
- authentication, backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100