Refresh authentication
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
Some registries (like Azure Container Registries) use a token authentication where the token needs to be refreshed every 3 hours. I have a long running process (Prefect Agent) that instantiates the APIClient at startup. The problem is that further down the road, the client attempts to .pull() an image, but it seems like it's still using the token from .docker/config.json at the time of instantiation.
Is there any way of setting a flag parameter on the .pull() method, or maybe is there a method on the client that could be implemented in order to refresh the authentication before attempting the pull?
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.
Research direction
Start by tracing APIClient initialization and the .pull() path, focusing on how credentials from .docker/config.json are loaded and reused. Determine how token refresh should be triggered for long-running clients. Done means a client can pull after token expiry without requiring process restart, with coverage for the refresh behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- api, authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100