Giter VIP home page Giter VIP logo

Comments (3)

mspiegel31 avatar mspiegel31 commented on May 30, 2024 1

@Rugvip ahh, found the issue. I had forgotten to migrate the permissions backend as well. I needed to add the lines

// permissions + permission policy
backend.add(import('@backstage/plugin-permission-backend/alpha'));
backend.add(
  import('@internal/plugin-custom-permissions-backend'),
);

and now things are working as expected. Sorry for the noise, closing!

from backstage.

Rugvip avatar Rugvip commented on May 30, 2024

Do you have a backend.start() as well at the end? Could be what's missing although I wouldn't really expect it given the error. Looks alright otherwise though

from backstage.

mspiegel31 avatar mspiegel31 commented on May 30, 2024

Do you have a backend.start() as well at the end? Could be what's missing although I wouldn't really expect it given the error. Looks alright otherwise though

@Rugvip yup, there's a backend.start() call right after all the backend.add(...) statements.

does the new built-in authentication middleware return 404s when the request isn't authenticated? I get this response when trying to hit the backend API route through the terminal:

$ http --body http://localhost:7007/api/catalog/entities                                                                                                                                ue1.staging-ue1.staging
{
    "error": {
        "body": {
            "error": {
                "message": "Request failed with status 404 Not Found",
                "name": "Error"
            },
            "response": {
                "statusCode": 404
            }
        },
        "cause": {
            "message": "Request failed with status 404 Not Found",
            "name": "Error"
        },
        "message": "Request failed with 404 Not Found",
        "name": "ResponseError",
        "response": {
            "size": 0,
            "timeout": 0
        },
        "stack": "ResponseError: Request failed with 404 Not Found
          at Function.fromResponse (/Users/michaelspiegel/development/production/back-of-house/node_modules/@backstage/errors/src/errors/ResponseError.ts:76:12)
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
          at PermissionClient.makeRequest (/Users/michaelspiegel/development/production/back-of-house/node_modules/@backstage/plugin-permission-common/src/PermissionClient.ts:160:13)
          at AuthorizedEntitiesCatalog.entities (/Users/michaelspiegel/development/production/back-of-house/node_modules/@backstage/plugin-catalog-backend/src/service/AuthorizedEntitiesCatalog.ts:55:7)
          at <anonymous> (/Users/michaelspiegel/development/production/back-of-house/node_modules/@backstage/plugin-catalog-backend/src/service/createRouter.ts:135:40)",
        "statusCode": 404,
        "statusText": "Not Found"
    },
    "request": {
        "method": "GET",
        "url": "/entities"
    },
    "response": {
        "statusCode": 404
    }
}

I have the dangerouslyDisableDefaultAuthPolicy: true set in my app-config.yaml

backend:
  # Used for enabling authentication, secret is shared by all backend plugins
  # See https://backstage.io/docs/auth/service-to-service-auth for
  # information on the format
  auth:
    dangerouslyDisableDefaultAuthPolicy: true

from backstage.

Related Issues (20)

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.