InvalidSubjectTokenError#
- exception gafaelfawr.exceptions.InvalidSubjectTokenError#
Bases:
OAuthErrorThe GitHub Actions ID token presented to the token exchange is invalid.
This corresponds to the
invalid_granterror in RFC 6749 and RFC 8693, which the latter specifies for a subject token that is “invalid for any reason, including being expired, revoked, or malformed.” It is also used when the token verifies but matches no enabled GitHub project.Unlike
InvalidGrantError, the details are sent to the client. The message names the check that failed and values from the caller’s own token, which GitHub minted for the caller and which are already theirs to read, so that a workflow author can fix the problem without access to Gafaelfawr’s logs. It must never describe registry entries that did not match, so that the exchange cannot be used to probe what the registry trusts.