You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Actions fail behind an HTTP proxy: the management token request ignores the model's proxy settings #68
A Juju model whose only way out of the cluster is an HTTP proxy, given to the models as the controller's juju-http-proxy, juju-https-proxy and juju-no-proxy defaults. tenant-service is related to Hydra over oauth, and Hydra's token endpoint is its public URL. Juju 3.6, the charm at main (abec70c).
WARNING juju-log Failed to obtain management token
The same happens to every action that runs the CLI with _get_management_token().
The charm asks for its token from the charm container with requests, with no proxy and no timeout (src/clients.py L43-L49). Juju gives the model's proxy settings to the charm as JUJU_CHARM_HTTP_PROXY, JUJU_CHARM_HTTPS_PROXY and JUJU_CHARM_NO_PROXY, which requests does not read. So the request connects directly and waits until the kernel's connect timeout.
_get_management_token() logs a warning and returns None (src/charm.py L717-L736), and the CLI then runs with --token no-token (src/cli.py L361). The action reports invalid token instead of the reason.
get-access-token makes the same request and fails the same way, but it shows the connection error.
The workload is not affected: it gets HTTP_PROXY, HTTPS_PROXY and NO_PROXY from the charm's options.
Steps to reproduce
In a model with juju-https-proxy set and no direct route to Hydra's public URL, deploy tenant-service and relate it to Hydra (oauth), PostgreSQL and Kratos.
juju run tenant-service/0 create-tenant name=test
Expected
The token request goes through the model's proxy (and skips it for the hosts in juju-no-proxy), has a timeout, and when it fails the action fails with the reason.
Possible fix
Give the session the proxies from JUJU_CHARM_HTTP_PROXY, JUJU_CHARM_HTTPS_PROXY and JUJU_CHARM_NO_PROXY, pass a timeout to the request, and let the token error fail the action instead of running the CLI with no-token.
Activity
syncronize-issues-to-jira commentedon Oct 16, 2026
Thank you for reporting your feedback to us!
The internal ticket has been created: https://warthogs.atlassian.net/browse/IAM-2382.
fix: ask for the management token through the workload's proxy
fix: ask for the actions' token through the workload's proxy (#226)
fix: ask for the management token through the workload's proxy
fix: ask for the management token through the workload's proxy