Repository navigation
v0.6.0
Construction and authentication: an options-based New with no file I/O at
import time, Kerberos login from memory, WhoAmI, and recovery from expired
sessions. The session behaviour is checked against real FreeIPA 4.9, 4.12
and 4.13 by the contract tests.
Added
New(opts ...Option) (*Client, error)withWithHost,WithRealm,
WithCACert,WithHTTPClient,WithKrb5Config,WithKrb5ConfigDataand
WithPasswordRelogin. The old constructors keep their signaturesLoginWithKeytabData,LoginFromCCacheDataand in-memory Kerberos
configuration (WithKrb5ConfigData; idea from sitnikovv's fork), for
containers and secret storesWhoAmIandWhoAmIContext- Expired sessions are recovered: Kerberos clients retry once through
SPNEGO; withWithPasswordRelogin,RemoteLoginclients log in again
and retry once (a password FreeIPA rejects is forgotten; needs sticky
sessions; concurrent 401s cost one login). Other clients get
ErrUnauthorizedand the session is cleared ipatest.Server.CACert, andwhoamiandsession_logoutinipatest- "Which login to use" guide in the README and package documentation
Changed
- A 401 on a session request now clears the session (it was kept)
- Clients with a Kerberos login, old constructors included, retry once
through SPNEGO after a 401 NewDefaultClient*,NewClientandNewread/etc/ipaon first use
instead of at import;NewClientCustomHttpnever reads itClearSessionalso forgets the credentials kept byWithPasswordRelogin- FreeIPA's logout cookie (an
ipa_sessioncookie that deletes the session,
orMagBearerToken=) clears the session; before,session_logoutfailed
with "invalid set-cookie header"