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

feat(rbac): add support for rejectUnauthorized in PG SSL options #1613

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

boris154
Copy link

@boris154 boris154 commented May 6, 2024

Backstage's database configurations support various options that are being passed to the DB connection, example:

ssl:
  require: true
  rejectUnauthorized: false

This PR adds support for rejectUnauthorized.

Copy link

openshift-ci bot commented May 6, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign invinciblejai for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@boris154 boris154 changed the title fix(brace): Added support for rejectUnauthorized in PG SSL options fix(rbac): Added support for rejectUnauthorized in PG SSL options May 6, 2024
@boris154 boris154 changed the title fix(rbac): Added support for rejectUnauthorized in PG SSL options feat(rbac): Added support for rejectUnauthorized in PG SSL options May 6, 2024
@boris154 boris154 changed the title feat(rbac): Added support for rejectUnauthorized in PG SSL options feat(rbac): add support for rejectUnauthorized in PG SSL options May 6, 2024
Copy link

sonarcloud bot commented May 6, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@PatAKnight PatAKnight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, thank you for this PR. Sorry that we are just now getting around to reviewing it. Had one comment that I wanted to get your opinion on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there is some overlap between the knex client and typeORMAdapter. So we can update to instead do something like the below. Which would allow us to no longer have to use custom code to resolve ssl.

adapter = await TypeORMAdapter.newAdapter({
  type: 'postgres',
  username: databaseConfig?.getString('connection.user'),
  password: databaseConfig?.getString('connection.password'),
  ...knexClient.client.config.connection
});

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants