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

Remove support for disabling the non-PKCE OIDC authentication flow #2713

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Nothing should go in this section, please add to the latest unreleased version
(and update the corresponding date), or add a new version.

## [1.19.3] - 2023-01-26
## [1.19.3] - 2023-03-21

### Changed
- Removes support for disabling the `CONJUR_FEATURE_PKCE_SUPPORT_ENABLED` flag.
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

[cyberark/conjur#2713](https://github.com/cyberark/conjur/pull/2713)

## [1.19.2] - 2023-02-01
Copy link
Contributor

Choose a reason for hiding this comment

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

1.19.2 is already published, so 1.19.3 (or greater) is actually correct. This seems like more than a patch level change. So moving it to 1.20.0 might be appropriate here.


### Added
- Conjur now logs when it detects that the Conjur configuration file
Expand Down
14 changes: 5 additions & 9 deletions app/db/repository/authenticator_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ class AuthenticatorRepository
def initialize(
data_object:,
resource_repository: ::Resource,
logger: Rails.logger,
pkce_support_enabled: Rails.configuration.feature_flags.enabled?(:pkce_support)
logger: Rails.logger
)
@resource_repository = resource_repository
@data_object = data_object
@logger = logger
@pkce_support_enabled = pkce_support_enabled
end

def find_all(type:, account:)
Expand Down Expand Up @@ -73,12 +71,10 @@ def load_authenticator(type:, account:, service_id:)
end

begin
if @pkce_support_enabled
allowed_args = %i[account service_id] +
@data_object.const_get(:REQUIRED_VARIABLES) +
@data_object.const_get(:OPTIONAL_VARIABLES)
args_list = args_list.select{ |key, value| allowed_args.include?(key) && value.present? }
end
allowed_args = %i[account service_id] +
@data_object.const_get(:REQUIRED_VARIABLES) +
@data_object.const_get(:OPTIONAL_VARIABLES)
args_list = args_list.select { |key, value| allowed_args.include?(key) && value.present? }
@data_object.new(**args_list)
rescue ArgumentError => e
@logger.debug("DB::Repository::AuthenticatorRepository.load_authenticator - exception: #{e}")
Expand Down
7 changes: 1 addition & 6 deletions app/domain/authentication/authn_oidc/authenticator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ def status(authenticator_status_input:)
# is done, the following check can be removed.

# Attempt to load the V2 version of the OIDC Authenticator
data_object = if Rails.configuration.feature_flags.enabled?(:pkce_support)
Authentication::AuthnOidc::PkceSupportFeature::DataObjects::Authenticator
else
Authentication::AuthnOidc::V2::DataObjects::Authenticator
end
authenticator = DB::Repository::AuthenticatorRepository.new(
data_object: data_object
data_object: Authentication::AuthnOidc::V2::DataObjects::Authenticator
).find(
type: authenticator_status_input.authenticator_name,
account: authenticator_status_input.account,
Expand Down
115 changes: 0 additions & 115 deletions app/domain/authentication/authn_oidc/pkce_support_feature/client.rb

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading