Code Monkey home page Code Monkey logo

backstage-plugin's People

Contributors

bigblue79 avatar dependabot[bot] avatar katerberg avatar opslevel-ops avatar patrick-th avatar rauhut avatar sergio-opslevel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

backstage-plugin's Issues

Getting Error while Installation : useLocation() may be used only in the context of a Router component

Hi,
I tried installing this plugin by following the steps mentioned here: https://github.com/OpsLevel/backstage-plugin
After I added all the configurations and started the backstage-app, I got this error:
image
When I tried to check which configuration step is causing this error, I realized this error prompts as soon as I added this plugin using below command:

yarn add --cwd packages/app backstage-plugin-opslevel-maturity

Please, let me if I am missing something @patrick-th @sabeerzaman and @sergio-opslevel.

Bug: Graphql call is potentially insecure

Environment

Calls to graphql endpoint are insecure (see

export class OpsLevelGraphqlAPI implements OpsLevelApi {
)

Documentation requires us to use backstage proxy configuration which, by default since version 1.28, is now requiring to send backstage user jwt token via Authorization HTTP header. This is in direct conflict with opslevel proxy settings that sets a static opslevel api token. The workaround is to add credentials: dangerously-allow-unauthenticated in the proxy setting. However, this allows anyone on the internet to use our backstage instance as an unauthenticated proxy to our opslevel account.

A potential solution would be to add an oauth endpoint in opslevel, ask the backstage user to authenticate using backstage scmAuth api and use the oauth token in the graphql API. This would secure the endpoint and allow using credentials: dangerously-allow-unauthenticated without risk.

What did you do?

Configuration
opslevel:
  baseUrl: 'https://app.opslevel.com'

proxy:
  endpoints:
    '/opslevel':
      target: 'https://app.opslevel.com'
      headers:
        X-Custom-Source: backstage
        Authorization: Bearer ${OPSLEVEL_API_KEY}
      allowedHeaders: ['GraphQL-Visibility']

What did you expect to happen?

Opslevel should ask user authentication instead of using a global token.

What actually happened?

Anyone can use a backstage instance configured with opslevel to bypass backstage's authentication and directly use the proxy configured opslevel api key.

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.