Skip to content

Ability to enumerate active users #4035

@zoetian

Description

@zoetian

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:

  1. Parsing Log. As @pivotal-jwinters suggested, we could filter out the event atc.dex.event
    from the log for the past 60 days.
  2. New DB Table. @YoussB proposed to add a new database table active_user in current DB to update the user last_login_date to 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

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."`
), potentially allowing folks to take a very long time to have to re-authenticate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsize/largeA ton of work, possibly in multiple places. Mostly understood, but there may be unknown unknowns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions