Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/arrikto/oidc-authservice
/ functions
Functions
143 in github.com/arrikto/oidc-authservice
⨍
Functions
143
◇
Types & classes
38
↓ 16 callers
Function
ReturnMessage
(w http.ResponseWriter, statusCode int, msg string)
common/util.go:104
↓ 15 callers
Function
RequestLogger
(r *http.Request, info string)
common/util.go:60
↓ 13 callers
Method
Error
()
common/errors.go:16
↓ 9 callers
Function
createRequest
(host string, addJWT bool)
authorizer_external_test.go:33
↓ 8 callers
Function
GetBearerToken
(value string)
common/util.go:191
↓ 7 callers
Function
MustParseURL
(rawURL string)
common/util.go:167
↓ 7 callers
Function
SetTLSContext
(ctx context.Context, caBundle []byte)
common/util.go:148
↓ 7 callers
Function
StandardLogger
()
common/util.go:68
↓ 6 callers
Method
Claims
(v interface{})
oidc/oidc.go:37
↓ 6 callers
Method
Close
()
sessions/session.go:32
↓ 6 callers
Function
mustParseURL
(rawURL string)
e2e/e2e_test.go:512
↓ 5 callers
Method
Decode
Decode creates a new UserIDTransformer using as input a JSON formatted string for rules initialization. The accepted JSON format is: { [ {"matches": "
common/transformer_userid.go:66
↓ 5 callers
Function
ResolvePathReference
(u *url.URL, p string)
common/util.go:175
↓ 5 callers
Function
waitForDeployment
( c client.Client, namespace, name string, timeout time.Duration, period time.Duration, )
e2e/e2e_test.go:397
↓ 4 callers
Function
GetUserInfo
GetUserInfo uses the token source to query the provider's user info endpoint. We reimplement UserInfo [1] instead of using the go-oidc's library UserI
oidc/oidc.go:140
↓ 4 callers
Function
InterfaceSliceToStringSlice
(in []interface{})
common/util.go:211
↓ 4 callers
Function
RevokeOIDCSession
RevokeOIDCSession revokes the given session, which is assumed to be an OIDC session, for which it also performs the necessary cleanup. TODO: In the fu
sessions/session.go:106
↓ 4 callers
Method
Transform
Transform modifies the UserID based on user provided rules. This method will search the rules in order, find the first that matches the userID and rep
common/transformer_userid.go:41
↓ 4 callers
Function
login
login performs an OIDC login and return the session cookie
e2e/e2e_test.go:299
↓ 4 callers
Function
portForward
(kind, namespace, name, hostPort, targetPort string, stopCh chan struct{})
e2e/e2e_test.go:487
↓ 3 callers
Function
NewConfig
(clientID string)
oidc/oidc.go:42
↓ 3 callers
Function
TokenSource
TokenSource is a wrapper around oauth2.Config.TokenSource that additionally returns a boolean indicator for a token refresh.
oidc/oidc.go:116
↓ 3 callers
Method
Verifier
(config *oidc.Config)
oidc/oidc.go:39
↓ 3 callers
Function
download_to
(url, output_path)
hack/binary_deps.py:27
↓ 3 callers
Function
ensureInSlice
(elem string, slice []string)
common/settings.go:154
↓ 3 callers
Function
trimSpaceFromStringSliceElements
(slice []string)
common/settings.go:143
↓ 2 callers
Method
Authorize
(r *http.Request, userinfo user.Info)
authorizer_groups.go:19
↓ 2 callers
Function
DoRequest
(ctx context.Context, req *http.Request)
common/util.go:181
↓ 2 callers
Function
ParseConfig
()
common/settings.go:85
↓ 2 callers
Function
ParseJWT
We copy the parseJWT() from: https://github.com/coreos/go-oidc/blob/v3/oidc/verify.go to perform one of the necessary local tests for the JWT authenti
common/util.go:247
↓ 2 callers
Function
ParseUserInfo
ParseUserInfo unmarshals the response of the UserInfo endpoint and enforces boolean value for the EmailVerified claim.
oidc/oidc.go:74
↓ 2 callers
Function
SessionFromID
SessionFromID returns a session which has its key in a header. XXX: Because the session library we use doesn't support getting a session by key, we ne
sessions/session.go:42
↓ 2 callers
Function
SessionFromRequest
SessionFromRequest looks for a session id in a header and a cookie, in that order. If it doesn't find a valid session in the header, it will then chec
sessions/session.go:59
↓ 2 callers
Method
Start
(addr string)
web_server.go:33
↓ 2 callers
Function
UserInfoToHeaders
(info user.Info, opts *HTTPHeaderOpts, transformer *UserIDTransformer)
common/util.go:199
↓ 2 callers
Method
authenticate
authenticate is the core function of AuthService. It implements the following steps: 1. attempt to authenticate the user who is performing the examine
server.go:122
↓ 2 callers
Function
createNonce
(length int)
common/util.go:132
↓ 2 callers
Function
download_from_tar
(url, output_dir, paths_inside_tar=[], flatten=True)
hack/binary_deps.py:34
↓ 2 callers
Method
getRequestInfo
getRequestInfo creates a AuthorizationRequestInfo object for the current context.
authorizer_external.go:108
↓ 2 callers
Method
getUserInfo
getUserInfo creates a AuthorizationUserInfo object for the current context.
authorizer_external.go:85
↓ 2 callers
Function
main
()
hack/binary_deps.py:51
↓ 2 callers
Function
newBoltDBSessionStore
newBoltDBSessionStore returns a session store backed by BoltDB. The database is stored in the given path and keys are stored in the given bucket. If t
sessions/boltdb.go:39
↓ 2 callers
Function
newGroupsAuthorizer
(allowlist []string)
authorizer_groups.go:26
↓ 2 callers
Function
newRedisSessionStore
(addr, password, keyPrefix string, db int)
sessions/redis.go:12
↓ 2 callers
Method
performLocalChecks
Perform local checks for the issuer and the audiences
authenticators/jwt.go:103
↓ 2 callers
Method
retrieveUserIDGroupsClaims
Retrieve the USERID_CLAIM and the GROUPS_CLAIM from the JWT access token
authenticators/jwt.go:139
↓ 2 callers
Method
retrieveUserIDGroupsClaims
Retrieve the USERID_CLAIM and the GROUPS_CLAIM from the /userinfo response
authenticators/opaque.go:78
↓ 2 callers
Function
revokeSession
revokeSession revokes the given session.
sessions/session.go:86
↓ 2 callers
Function
revokeToken
revokeToken takes care of revoking an access/refresh token to the IdP. The revocation procedure is described in RFC7009: https://tools.ietf.org/html/r
oidc/revoke.go:76
↓ 2 callers
Function
siteHandler
siteHandler returns an http.HandlerFunc that serves a given template
web_server.go:90
↓ 2 callers
Function
validAccessTokenAuthn
validAccessTokenAuthn() examines if the admins have configured a valid value for the ACCESS_TOKEN_AUTHN envvar.
common/settings.go:166
↓ 2 callers
Function
waitForStatefulSet
( c client.Client, namespace, name string, timeout time.Duration, period time.Duration, )
e2e/e2e_test.go:366
↓ 2 callers
Method
whitelistMiddleware
whitelistMiddleware is a middleware that - Allows all requests that match the whitelist - If the server is ready, forwards requests to be evaluated fu
server.go:541
↓ 1 callers
Method
AuthenticateRequest
(r *http.Request)
authenticators/jwt.go:34
↓ 1 callers
Method
Authorize
(r *http.Request, userinfo user.Info)
authorizer_external.go:51
↓ 1 callers
Function
Contains
This function examines if there is at least one common element between two []string objects. The JWT authenticator uses this function to verify that a
common/util.go:263
↓ 1 callers
Function
CreateState
CreateState creates the state parameter from the incoming request, stores it in the session store and sets a cookie with the session key. It returns t
sessions/state.go:40
↓ 1 callers
Method
Endpoint
()
oidc/oidc.go:38
↓ 1 callers
Method
Error
()
common/errors.go:33
↓ 1 callers
Method
Error
()
common/errors.go:49
↓ 1 callers
Method
GetCacheKey
(r *http.Request)
authenticators/authenticator.go:12
↓ 1 callers
Function
InitiateSessionStores
InitiateSessionStores initiates both the required stores for the: * users sessions * OIDC states Based on the configured session store (boltdb, or red
sessions/session.go:160
↓ 1 callers
Function
NewKubernetesAuthenticator
(c *rest.Config, aud []string)
authenticators/kubernetes.go:25
↓ 1 callers
Function
NewProvider
(ctx context.Context, u *url.URL)
oidc/oidc.go:46
↓ 1 callers
Function
NewSession
(store Store, name string)
sessions/session.go:35
↓ 1 callers
Function
RealPath
(path string)
common/util.go:48
↓ 1 callers
Function
ReturnHTML
(w http.ResponseWriter, statusCode int, html string)
common/util.go:95
↓ 1 callers
Function
ReturnJSONMessage
(w http.ResponseWriter, statusCode int, jsonMsg interface{})
common/util.go:113
↓ 1 callers
Function
RevocationEndpoint
RevocationEndpoint parses the OIDC Provider claims from the discovery document and tries to find the revocation_endpoint.
oidc/revoke.go:19
↓ 1 callers
Function
RevokeTokens
RevokeTokens is a helper that takes an oauth2.Token and revokes the access and refresh tokens. If no tokens are found, it succeeds.
oidc/revoke.go:34
↓ 1 callers
Function
SaveToken
SaveToken triggers oidc.TokenSource to refresh access and refresh token if they have expired and saves them to the session
sessions/session.go:133
↓ 1 callers
Function
SetLogLevel
(level string)
common/util.go:72
↓ 1 callers
Function
VerifyState
VerifyState gets the state from the cookie 'initState' saved. It also gets the state from an http param and: 1. Confirms the two values match (CSRF ch
sessions/state.go:80
↓ 1 callers
Method
apply
apply does the actual transformation to userID.
common/transformer_userid.go:18
↓ 1 callers
Function
applyKustomizations
(kustomizations []string)
e2e/e2e_test.go:460
↓ 1 callers
Method
authCodeFlowAuthenticationRequest
authCodeFlowAuthenticationRequest initiates an OIDC Authorization Code flow
server.go:307
↓ 1 callers
Method
authorized
authorize tries out all of the available authorizers. If at least one of them does not allow the user to make the request then AuthService denies the
server.go:234
↓ 1 callers
Function
createK3DCluster
()
e2e/e2e_test.go:428
↓ 1 callers
Function
deleteK3DCluster
()
e2e/e2e_test.go:456
↓ 1 callers
Method
doRequest
doRequest does the request to the external authorization server.
authorizer_external.go:125
↓ 1 callers
Method
enabledAuthenticator
enabledAuthenticator indicates if the examined authenticator is enabled.
server.go:446
↓ 1 callers
Method
getCachedUser
getCachedUser returns: * the UserInfo * the cacheKey if there is an entry in the cache for the examined user. Otherwise, it returns an empty string fo
server.go:277
↓ 1 callers
Function
getEnvsFromPrefix
(prefix string)
common/settings.go:131
↓ 1 callers
Function
getUserIP
(r *http.Request)
common/util.go:86
↓ 1 callers
Method
isApplicable
isApplicable checks if the rule is relevant for the userID.
common/transformer_userid.go:16
↓ 1 callers
Function
listTemplates
(dir string)
web_server.go:99
↓ 1 callers
Function
newState
(firstVisitedURL string)
sessions/state.go:30
↓ 1 callers
Function
parse_args
()
hack/binary_deps.py:20
↓ 1 callers
Function
readiness
readiness is the handler that checks if the authservice is ready for serving requests. Currently, it checks if the provider is nil, meaning that the s
server.go:522
↓ 1 callers
Function
startFakeOIDCProvider
(addr string)
oidc/oidc_test.go:18
↓ 1 callers
Method
tryAuthenticators
tryAuthenticators will iterate over the available enabled authenticators. If one of them manages to authenticate the user who is making the requester
server.go:167
↓ 1 callers
Function
validLogLevel
validLogLevel() examines if the admins have configured a valid value for the LOG_LEVEL envvar.
common/settings.go:203
↓ 1 callers
Function
validSessionStoreType
validSessionStoreType() examines if the admins have configured a valid value for the SESSION_STORE_TYPE envvar.
common/settings.go:186
Method
AuthenticateRequest
(r *http.Request)
authenticators/idtoken.go:21
Method
AuthenticateRequest
(r *http.Request)
authenticators/session.go:38
Method
AuthenticateRequest
(r *http.Request)
authenticators/opaque.go:23
Method
AuthenticateRequest
(r *http.Request)
authenticators/kubernetes.go:36
Method
Authorize
(r *http.Request, userinfo user.Info)
authorizer_groups.go:40
Method
Claims
Claims unmarshals the raw JSON object claims into the provided object.
oidc/oidc.go:65
Method
Close
()
sessions/boltdb.go:89
next →
1–100 of 143, ranked by callers