-
-
Notifications
You must be signed in to change notification settings - Fork 877
Description
Why we want to enhance this feature?
There's no accurate measure on the number of active users on a concourse cluster.
We proposed two ways of doing this:
- Parsing Log. As @pivotal-jwinters suggested, we could filter out the event
atc.dex.event
from the log for the past 60 days. - New DB Table. @YoussB proposed to add a new database table
active_userin current DB to update the userlast_login_dateto enumerate the active users. This would require additional changes to the current login flow. The table schema may look like below:
| username | last_login_date |
|---|
And the Pros and Cons we (@pivotal-bin-ju and I) can think about for now:
| Pros | Cons | |
|---|---|---|
| 1. Parsing Log | - No need to modify source code - Only need to parse the logs |
- Get access to the users' log - Analyzing Logs for 2 months of the size roughly 20G can be time consuming - It is hard to keep the Log from last 2 months for some users |
| 2. New DB Table | - Cleaner way to enumerate active users | - Extra effort on modifying the login flow and database schema - Increase certain DB usage |
Issue Status
Working is being done on the feature/4035-active-users branch
Sidenote (@taylorsilva): when logging in as a user that's not part of any team (guest user in docker-compose) we get a HTTP 400 back and a blank screen at the /sky/callback endpoint. Logs show "error":"user doesn't belong to any team". Thinking this may be a regression. This note is to remind us to check this out and potentially report.
and fly:
fly -t local login -u guest -p guest
logging in to team 'main'
error: oauth2: cannot fetch token: 400 Bad Request
Response:
Sidenote 2 (@cirocosta): Concourse allows operators to set the duration of the tokens that are generated (see
concourse/skymarshal/skycmd/flags.go
Line 48 in e5bcd88
| Expiration time.Duration `long:"auth-duration" default:"24h" description:"Length of time for which tokens are valid. Afterwards, users will have to log back in."` |