mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-02 19:04:14 +02:00
authorize: track session and service account access date (#3220)
* session: add accessed at date
* authorize: track session and service account access times
* Revert "databroker: add support for field masks on Put (#3210)"
This reverts commit 2dc778035d
.
* add test
* fix data race in test
* add deadline for update
* track dropped accesses
This commit is contained in:
parent
a243056cfa
commit
36f73fa6c7
14 changed files with 474 additions and 67 deletions
|
@ -16,6 +16,17 @@ func Get(ctx context.Context, client databroker.DataBrokerServiceClient, userID
|
|||
return u, databroker.Get(ctx, client, u)
|
||||
}
|
||||
|
||||
// GetServiceAccount gets a service account from the databroker.
|
||||
func GetServiceAccount(ctx context.Context, client databroker.DataBrokerServiceClient, serviceAccountID string) (*ServiceAccount, error) {
|
||||
sa := &ServiceAccount{Id: serviceAccountID}
|
||||
return sa, databroker.Get(ctx, client, sa)
|
||||
}
|
||||
|
||||
// PutServiceAccount saves a service account to the databroker.
|
||||
func PutServiceAccount(ctx context.Context, client databroker.DataBrokerServiceClient, serviceAccount *ServiceAccount) (*databroker.PutResponse, error) {
|
||||
return databroker.Put(ctx, client, serviceAccount)
|
||||
}
|
||||
|
||||
// AddClaims adds the flattened claims to the user.
|
||||
func (x *User) AddClaims(claims identity.FlattenedClaims) {
|
||||
if x.Claims == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue