StreamState / terraform-k8s-configuration

1 stars 1 forks source link

Add user Id or machine (client_id) to the spark applications #89

Open danielhstahl opened 3 years ago

danielhstahl commented 3 years ago

When submitting jobs, add a label for user id (if submitted by a user) or client id (if submitted by a machine)

danielhstahl commented 3 years ago

this requires a post request to /oauth2/userinfo, see https://oauth2-proxy.github.io/oauth2-proxy/docs/features/endpoints

danielhstahl commented 3 years ago

If done using M2M then the client id can be extracted from the Bearer Header. Base64 decode and get the client id. Be careful since the bearer header includes the client secret as well. It may be worth seeing if a post to oauth2/userinfo can provide anything interesting for M2M applications.