Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RBAC plugin not working. #1701

Closed
crazy-canux opened this issue May 22, 2024 · 2 comments · Fixed by #2122
Closed

RBAC plugin not working. #1701

crazy-canux opened this issue May 22, 2024 · 2 comments · Fixed by #2122
Labels
jira kind/bug Something isn't working status/triage

Comments

@crazy-canux
Copy link

Describe the bug

After integrate rbac plugin with backstage 1.25.2, it's not working.

{"level":"info","message":"RBAC backend plugin was enabled","plugin":"permission","service":"backstage","type":"plugin"}
Backend failed to start up Error: unable to verify the first certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1659:34)
    at TLSSocket.emit (node:events:517:28)
    at TLSSocket._finishInit (node:_tls_wrap:1070:8)
    at ssl.onhandshakedone (node:_tls_wrap:856:12) {
  code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
}

Expected Behavior

works .

What are the steps to reproduce this bug?

  1. backend change.
  2. frontend change.
  3. configuration change.

Versions of software used and environment

backstage: 1.25.2
"@janus-idp/backstage-plugin-rbac": "^1.18.2",
"@janus-idp/backstage-plugin-rbac-backend": "^3.0.0",

@crazy-canux crazy-canux added kind/bug Something isn't working status/triage labels May 22, 2024
@github-actions github-actions bot added the jira label May 22, 2024
@crazy-canux
Copy link
Author

/app/packages/backend-app-api/dist/index.cjs.js:1680
            throw new errors.ForwardedError(
                  ^

ForwardedError: Plugin 'permission' startup failed; caused by Error: unable to verify the first certificate
    at /app/packages/backend-app-api/dist/index.cjs.js:1680:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /app/packages/backend-app-api/dist/index.cjs.js:1679:11
    at async Promise.all (index 11)
    at async #doStart (/app/packages/backend-app-api/dist/index.cjs.js:1633:5)
    at async BackendInitializer.start (/app/packages/backend-app-api/dist/index.cjs.js:1562:5)
    at async BackstageBackend.start (/app/packages/backend-app-api/dist/index.cjs.js:1762:5) {
  cause: Error: unable to verify the first certificate
      at TLSSocket.onConnectSecure (node:_tls_wrap:1659:34)
      at TLSSocket.emit (node:events:517:28)
      at TLSSocket._finishInit (node:_tls_wrap:1070:8)
      at ssl.onhandshakedone (node:_tls_wrap:856:12) {
    code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
  }
}

Node.js v18.20.4

@AndrienkoAleksandr
Copy link
Collaborator

I reproduced this bug with configuration:

database:
      ....
      ssl:
        rejectUnauthorized: false

Error:

backend:start: /Users/oandriie/projects/backstage-plugins/node_modules/@backstage/backend-app-api/src/wiring/BackendInitializer.ts:291
backend:start:             throw new ForwardedError(
backend:start:                   ^
backend:start:
backend:start:
backend:start: ForwardedError: Plugin 'permission' startup failed; caused by Error: unable to verify the first certificate
backend:start:     at <anonymous> (/Users/oandriie/projects/backstage-plugins/node_modules/@backstage/backend-app-api/src/wiring/BackendInitializer.ts:291:19)
backend:start:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
backend:start:     at <anonymous> (/Users/oandriie/projects/backstage-plugins/node_modules/@backstage/backend-app-api/src/wiring/BackendInitializer.ts:290:11)
backend:start:     at async Promise.all (index 7)
backend:start:     at BackendInitializer.#doStart (/Users/oandriie/projects/backstage-plugins/node_modules/@backstage/backend-app-api/src/wiring/BackendInitializer.ts:236:5)
backend:start:     at BackendInitializer.start (/Users/oandriie/projects/backstage-plugins/node_modules/@backstage/backend-app-api/src/wiring/BackendInitializer.ts:150:5)
backend:start:     at BackstageBackend.start (/Users/oandriie/projects/backstage-plugins/node_modules/@backstage/backend-app-api/src/wiring/BackstageBackend.ts:42:11) {
backend:start:   cause: Error: unable to verify the first certificate
backend:start:       at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
backend:start:       at TLSSocket.emit (node:events:519:28)
backend:start:       at TLSSocket._finishInit (node:_tls_wrap:1085:8)
backend:start:       at ssl.onhandshakedone (node:_tls_wrap:871:12) {
backend:start:     code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
backend:start:   }
backend:start: }

I think user used rejectUnauthorized. So this bug will be fixed when we will merge pr #2122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira kind/bug Something isn't working status/triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants