Code Monkey home page Code Monkey logo

grafana-gsuite-sync's People

Contributors

krystianity avatar rikimaru0345 avatar yacut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

grafana-gsuite-sync's Issues

Service Account Permissions

Before I dive in to this issue I would like to say: Thanks for building this really useful tool. It's small succinct and appears to be exactly what I'm looking for it I could just get beyond this hurdle.


Now my hurdle...

There is no documentation here (or anywhere else) about which permissions are required, or how to set up a service account that can be used when running this tool.

I have been trying to work out the correct workflow and permissions, but without success.

This is what I have got so far:

  1. Create Service Account with Project View permission
    • Open the Service accounts page, If prompted, select a project.
    • Click Create service account
    • In the Create service account window, type a name for the service account and click Create
    • Add the Project > Viewer role and click Continue
    • Click Create Key, select Key type JSON and click Create to download the key
    • This is the google credentials file to be passed to grafana-gsuite-sync.
  2. Enable G Suite Domain-wide Delegation
    • Open the Service accounts page, If prompted, select a project.
    • Click the newly created service account
    • Click Edit
    • Expand the Show Domain-Wide Delegation section.
    • Check the * Enable G Suite Domain-wide Delegation* checkbox
    • Click Save
    • Copy the Client ID to grant API client access over your domain
  3. Grant API client access
    • Go to your G Suite domain's Admin Console
    • Select Security from the list of controls. If you don't see Security listed, select More controls from the grey bar at the bottom of the page, then select Security from the list of controls.
    • Select Advanced settings from the list of options.
    • Select Manage API client access from the Authentication section.
    • In the Client name field enter the service account's Client ID.
    • In the One or More API Scopes field enter the list of scopes that your application should be granted access to (see image below). For example if you need domain-wide access to Users and Groups enter: https://www.googleapis.com/auth/admin.directory.user, https://www.googleapis.com/auth/admin.directory.group
    • Click the Authorize button.

When running this tool after following this process I get this error:

[2019-01-23T17:16:52.621Z] ERROR (49472 on EmergencyBacon.local): Not Authorized to access this resource/api
    Error: Not Authorized to access this resource/api
        at createError (/Users/uatec/Development/google-cloud-tools/grafana-gsuite-sync/node_modules/axios/lib/core/createError.js:16:15)
        at settle (/Users/uatec/Development/google-cloud-tools/grafana-gsuite-sync/node_modules/axios/lib/core/settle.js:18:12)
        at Unzip.handleStreamEnd (/Users/uatec/Development/google-cloud-tools/grafana-gsuite-sync/node_modules/axios/lib/adapters/http.js:201:11)
        at Unzip.emit (events.js:187:15)
        at endReadableNT (_stream_readable.js:1094:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)

If you can give me a few pointers I can raise a PR to document this process.

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.