GithubHelp home page GithubHelp logo

weaveworks / quay-admin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jml/quay-admin

1.0 2.0 1.0 11 KB

Administer quay.io repositories for an organization

License: Apache License 2.0

Python 100.00%

quay-admin's Introduction

quay-admin

quay.io is pretty neat, but how do you know who has access to your repositories?

If you've got a small number of them, you can click through to each one and see who has what permissions. But if you're an organization with a large number of repositories, it's very hard to see who can access your repositories.

In particular, when someone leaves your organization, how can you be sure that they can no longer upload images?

quay-admin is a simple command-line tool that shows which users who are outside your organization have access to which repositories.

For example:

$ QUAY_TOKEN=<YOUR_TOKEN_HERE> quay-admin woofshop
woofshop/landscape
- niceperson [admin]

woofshop/spoonbridge
- cooldude [admin]

woofshop/thingdoer
- dodgybloke [admin]

Installing

$ pip install quayadmin

Running

Everything is under the quay-admin command, which has its own help.

usage: quay-admin [-h] [--from-state FROM_STATE] [--api-root API_ROOT]
                  [--dump-state DUMP_STATE]
                  namespace

Show information about quay.io permissions

positional arguments:
  namespace             Namespace to look in

optional arguments:
  -h, --help            show this help message and exit
  --from-state FROM_STATE
                        If provided, get quay.io state from a file, rather
                        than an API
  --api-root API_ROOT   Root of quay.io API. Ignored if --from-state provided.
  --dump-state DUMP_STATE
                        If provided, dump state to a file. Will overwrite file
                        if it exists.

To do anything useful, you will need an access token that has permission to "Administer Repositories". See the quay.io API documentation for more information.

Running quay-admin will produce a text report of users who aren't in your organization but who do have access to your repositories. If such users exist, the script will exit with code 1.

The normal state is to gather data from quay.io. However, you can save all that state with the --dump-state flag, and then load it later with --from--state. This can be useful for performing your own analysis, or developing new reporting functionality.

quay-admin's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.