Skip to content

limit user access to specific pipeline #106

Closed

Description

@cppforlife

We have a CI (https://main.bosh-ci.cf-app.com/) that has multiple pipelines and would like to limit specific users to specific pipelines. I hear long term plan is to integrate with UAA but for a short term solution it would be nice to set basic auth creds per pipeline when deploying atc.

Activity

  1. concourse-bot commented on Aug 5, 2015

    @concourse-bot

    Hi there!

    We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.

    The current status is as follows:

    • #108151454 TriggerBuild should work via an API endpoint
    • #108151560 Logging in via the web UI should work via the API
    • #108263400 Builds should work via an API endpoint
    • #108151468 ListJobBuilds should be paginated
    • #108151494 GetResource should work via an API endpoint
    • #107330058 Add team object, which pipelines belong to
    • #109493662 Add Authentication to Teams
    • #107331350 When authorized as a superuser team, I can create another team
    • #110861806 Add a test suite that makes sure that authentication and authorization works to the pipeline to testflight
    • #110676138 Confirm all team name lookups are case insensitive
    • #107362714 When authorized as a superuser team, I can update existing teams
    • #107331384 I can log in with fly to a specified team
    • #107521244 I can only view pipelines owned by my team
    • #107521572 I can only view one-off builds owned by my team
    • #119570315 namespace all pipelines routes under /teams
    • #107331886 I can log in via the web UI to a specific team
    • #120800211 I can login to a specific team using oauth methods (github+uaa)
    • #121157007 merge Build and BuildDB
    • #121172047 Pipelines sidebar doesn't work on /builds
    • #121162863 Index page should show me my currently authenticated team's first pipeline, not 'main' team
    • #107331592 I can configure public viewability on a pipeline-by-pipeline basis
    • #107331410 When authorized as a non-superuser team, I can update my own team's auth methods
    • #121544965 Return proper http error code when not authorized
    • #118791933 Workers can be owned by a team
    • #107331698 fly pipelines should by default only list my current team's pipelines
    • #121236069 fly containers should only show my team's containers
    • #126869361 I should only be able to hijack containers from my team
    • #127130721 switch from team name to team id for dedicated workers
    • #127405711 Cannot load 'main' pipeline after upgrading to teams
    • #127405707 /api/v1/pipelines order is random
    • #127509477 teams should be case-insensitive
    • #119691509 pipeline URL printed by set-pipeline is wrong (always says team main)
    • #126925309 fly volumes should only show my team's volumes
    • #126925303 Worker registration should require a system-level token
    • #126716199 fly workers should list the team's dedicated workers, with a column showing their team
    • #126318703 Un-hide set-team command
    • #126884023 I can register concourse binary worker with a team
    • #127219723 We shouldn't default team name to 'main' in API handlers
    • #126556411 UAA auth should have configurable certs to trust for communicating with UAA and CC
    • #126871129 Pipelines in the sidebar should be grouped by team, with the current team's pipelines up top
    • #126871083 Implement team login flow UI
    • #129019233 reopened: limit user access to specific pipeline

    This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

  2. vito commented on Oct 28, 2015

    @vito
    Contributor

    Rather than deploy-time, I'm thinking this should be done via fly. That would also make the Vagrant-built boxes more useful; right now they have no auth making the AWS box pretty useless. You'd also have to keep it in sync with your pipelines (and what if you configure the pipeline first, etc. etc.).

    It also shouldn't go in the pipeline template, since those should be reusable and generic. So maybe something like:

    fly set-pipeline-auth \
      -p foo \
      --basic-auth-username foo \
      --basic-auth-password bar \
      --github-auth-client-id abcdef \
      --github-auth-client-secret 324867jkherj \
      --github-auth-user vito

    ...Which you'd then just stow away in a script somewhere safe for keeping it up to date.

    There are other details to think about, i.e. what's the default for new pipelines. Maybe the flags are required as part of set-pipeline if it's a new one? Hmm.

  3. vito commented on Oct 29, 2015

    @vito
    Contributor

    Thinking about this a bit more, I suspect we'll need two tiers of auth:

    1. Superuser auth: today's auth - global to the instance, authorizes everything.
    2. Team auth: auth config defined for a given team under some short name.

    Teams would be created + updated like so:

    fly set-team \
      -n my-team \
      --basic-auth-username foo \
      --basic-auth-password bar

    Out of the box, there's a default admin team. Tokens authorized for this team can create other teams and see everything (today's behavior).

    Teams can create pipelines, and pipelines are owned by one team. Pipelines are cheap to create and they're encouraged for managing feature branches and concurrently supported versions, so the auth barrier to configuring them should be low.

    Teams would also be able to change their own credentials. This would make it easier to manage leaked credentials without relying on a superuser. It also makes the out-of-the-box experience a bit more intuitive; there'd be a default team and you can change its credentials. This would make the AWS box way more useful, too; right now it's wide open with no auth.

    The delta from today:

    • fly set-team would be added for reconfiguring an existing team. Superusers can run this command (which will create the team if it doesn't exist), and members of the specified team can run it to update the credentials.
    • The AWS vagrant box would come with a default superuser team.
    • publicly_viewable would be moved to a per-pipeline basis.
    • If a pipeline is not publicly_viewable, it will only show up in the sidebar if you're logged in.
    • We'll need to make the login button more prominent (and exist at all), and probably to show you who you're logged in as (i.e. github user / basic auth username) to prevent confusion ("where'd my pipeline go?").
    • Pipelines would become namespaced under their team, and grouped in the sidebar. The current team would show up up top.
  4. nicorikken commented on Nov 30, 2015

    @nicorikken

    +1

  5. wendorf commented on May 9, 2016

    @wendorf

    My use case around this is that I have multiple teams with low resource needs. I'd like to be able to provision a Concourse with medium/high resource levels and give individual teams access to their pipelines. Assuming that those with access are acting responsibly, they should be able to share an ATC and many workers without resource contention, but should only be able to modify the pipelines for their team.

    Ultimately, I'd like to be in the position where someone in my circle of trust can say "I wish I had Concourse, but deploying it is too hard", and I can say "I know your GitHub team is foo/bar. I've given you a foo-bar pipeline. Have fun."

  6. concourse-bot commented on Aug 25, 2016

    @concourse-bot

    Hello again!

    All stories related to this issue have been accepted, so I'm going to automatically close this issue.

    At the time of writing, the following stories have been accepted:

    • #108151454 TriggerBuild should work via an API endpoint
    • #108151560 Logging in via the web UI should work via the API
    • #108263400 Builds should work via an API endpoint
    • #108151468 ListJobBuilds should be paginated
    • #108151494 GetResource should work via an API endpoint
    • #107330058 Add team object, which pipelines belong to
    • #109493662 Add Authentication to Teams
    • #107331350 When authorized as a superuser team, I can create another team
    • #110861806 Add a test suite that makes sure that authentication and authorization works to the pipeline to testflight
    • #110676138 Confirm all team name lookups are case insensitive
    • #107362714 When authorized as a superuser team, I can update existing teams
    • #107331384 I can log in with fly to a specified team
    • #107521244 I can only view pipelines owned by my team
    • #107521572 I can only view one-off builds owned by my team
    • #119570315 namespace all pipelines routes under /teams
    • #107331886 I can log in via the web UI to a specific team
    • #120800211 I can login to a specific team using oauth methods (github+uaa)
    • #121157007 merge Build and BuildDB
    • #121172047 Pipelines sidebar doesn't work on /builds
    • #121162863 Index page should show me my currently authenticated team's first pipeline, not 'main' team
    • #107331592 I can configure public viewability on a pipeline-by-pipeline basis
    • #107331410 When authorized as a non-superuser team, I can update my own team's auth methods
    • #121544965 Return proper http error code when not authorized
    • #118791933 Workers can be owned by a team
    • #107331698 fly pipelines should by default only list my current team's pipelines
    • #121236069 fly containers should only show my team's containers
    • #126869361 I should only be able to hijack containers from my team
    • #127130721 switch from team name to team id for dedicated workers
    • #127405711 Cannot load 'main' pipeline after upgrading to teams
    • #127405707 /api/v1/pipelines order is random
    • #127509477 teams should be case-insensitive
    • #119691509 pipeline URL printed by set-pipeline is wrong (always says team main)
    • #126925309 fly volumes should only show my team's volumes
    • #126925303 Worker registration should require a system-level token
    • #126716199 fly workers should list the team's dedicated workers, with a column showing their team
    • #126318703 Un-hide set-team command
    • #126884023 I can register concourse binary worker with a team
    • #127219723 We shouldn't default team name to 'main' in API handlers
    • #126556411 UAA auth should have configurable certs to trust for communicating with UAA and CC
    • #126871129 Pipelines in the sidebar should be grouped by team, with the current team's pipelines up top
    • #126871083 Implement team login flow UI
    • #129019233 reopened: limit user access to specific pipeline

    If you feel there is still more to be done, or if you have any questions, leave a comment and we'll reopen if necessary!

  7. vito commented on Aug 25, 2016

    @vito
    Contributor

    BAM

  8. xoebus commented on Aug 25, 2016

    @xoebus
    Contributor

    DANG. WHAT'S UP WITH ALL THESE STORIES.

  9. drnic commented on Aug 25, 2016

    @drnic
    Contributor

    Awesome work! 

    On Thu, Aug 25, 2016 at 3:08 PM +1000, "Christopher Brown" [email protected] wrote:

    DANG. WHAT'S UP WITH ALL THESE STORIES.

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub, or mute the thread.

  10. added a commit that references this issue on Sep 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions