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

Support HTTPS_PROXY env variable in authn-oidc #2902

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

gl-johnson
Copy link
Contributor

Desired Outcome

Fix support for HTTPS_PROXY variable when using authn-oidc. This issue was occuring due to the underlying HTTP client of the OpenIDConnect gem, and appears to be fixed in a more recent version when it switched to Faraday as its HTTP client.

Implemented Changes

Updated OpenIDConnect gem to 2.x

Connected Issue/Story

CNJR-2390

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be
merged.

Changelog

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a
    CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code
    changes, or
  • The changes in this PR do not require tests

Documentation

  • Docs (e.g. READMEs) were updated in this PR
  • A follow-up issue to update official docs has been filed here: [insert issue ID]
  • This PR does not require updating any documentation

Behavior

  • This PR changes product behavior and has been reviewed by a PO, or
  • These changes are part of a larger initiative that will be reviewed later, or
  • No behavior was changed with this PR

Security

  • Security architect has reviewed the changes in this PR,
  • These changes are part of a larger initiative with a separate security review, or
  • There are no security aspects to these changes

@gl-johnson gl-johnson force-pushed the update-openid-connect branch 2 times, most recently from 7356c46 to fe1b50a Compare August 10, 2023 18:49
@john-odonnell john-odonnell force-pushed the update-openid-connect branch from eaeee77 to 834e212 Compare August 16, 2023 19:06
@gl-johnson gl-johnson force-pushed the update-openid-connect branch from 834e212 to 7ec4eb6 Compare August 16, 2023 20:51
### Fixed
- OIDC authenticator supports HTTPS_PROXY environment variable
[cyberark/conjur#2902](https://github.com/cyberark/conjur/pull/2902)
- Support plural syntax for revoke and deny
Copy link

Choose a reason for hiding this comment

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

Trailing spaces

CHANGELOG.md Outdated
## [1.20.0] - 2023-08-16

### Fixed
- OIDC authenticator supports HTTPS_PROXY environment variable
Copy link

Choose a reason for hiding this comment

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

Lists should be surrounded by blank lines

@gl-johnson gl-johnson marked this pull request as ready for review August 17, 2023 16:57
@gl-johnson gl-johnson requested a review from a team as a code owner August 17, 2023 16:57
CHANGELOG.md Outdated
## [1.20.0] - 2023-08-16

### Fixed
- OIDC authenticator supports HTTPS_PROXY environment variable
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this apply to V1 and V2? Might want to specify authenticators plural or authentication general.

@@ -104,7 +104,7 @@ def discovery_information(invalidate: false)
skip_nil: true
) do
@discovery_configuration.discover!(@authenticator.provider_uri)
rescue HTTPClient::ConnectTimeoutError, Errno::ETIMEDOUT => e
rescue Errno::ETIMEDOUT => e
Copy link
Contributor

Choose a reason for hiding this comment

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

I was trying to figure out whether we should replace these HTTPClient errors with Faraday ones, but I'm not sure that it's necessary. The error returned by discover! can only be type OpenIDConnect::Discovery::DiscoveryFailed, which is too non-specific, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep it's the same exception type for basically any network error that occurs. I suppose it would be doable to parse it out of the error message but that seemed a bit hacky and unnecessary

@gl-johnson gl-johnson force-pushed the update-openid-connect branch from 7ec4eb6 to 384321f Compare August 17, 2023 23:51
## [1.20.0] - 2023-08-16

### Fixed
- OIDC authenticators support `https_proxy` and `HTTPS_PROXY` environment variables
Copy link

Choose a reason for hiding this comment

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

Lists should be surrounded by blank lines

@codeclimate
Copy link

codeclimate bot commented Aug 18, 2023

Code Climate has analyzed commit 384321f and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 2

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 88.5% (0.0% change).

View more on Code Climate.

@gl-johnson gl-johnson merged commit 1de0a05 into master Aug 18, 2023
@gl-johnson gl-johnson deleted the update-openid-connect branch August 18, 2023 14:54
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.

2 participants