Skip to content

Commit

Permalink
Implement webauthn passwordless policy properties
Browse files Browse the repository at this point in the history
  • Loading branch information
TuningYourCode committed Jun 17, 2024
1 parent 14eef4e commit 2d2b37f
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions lib/puppet/type/keycloak_realm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,61 @@ def insync?(is)
defaultto []
end

newproperty(:web_authn_policy_passwordless_rp_entity_name) do
desc 'webAuthnPolicyPasswordlessRpEntityName'
defaultto 'keycloak'
end

newproperty(:web_authn_policy_passwordless_signature_algorithms, array_matching: :all, parent: PuppetX::Keycloak::ArrayProperty) do
desc 'webAuthnPolicyPasswordlessSignatureAlgorithms'
defaultto ['ES256']
end

newproperty(:web_authn_policy_passwordless_rp_id) do
desc 'webAuthnPolicyPasswordlessRpId'
defaultto ''
end

newproperty(:web_authn_policy_passwordless_attestation_conveyance_preference) do
desc 'webAuthnPolicyPasswordlessAttestationConveyancePreference'
newvalues('none', 'direct', 'indirect', 'not specified')
defaultto 'not specified'
end

newproperty(:web_authn_policy_passwordless_authenticator_attachment) do
desc 'webAuthnPolicyPasswordlessAuthenticatorAttachment'
newvalues('platform', 'cross-platform', 'not specified')
defaultto 'not specified'
end

newproperty(:web_authn_policy_passwordless_require_resident_key) do
desc 'webAuthnPolicyPasswordlessRequireResidentKey'
newvalues('No', 'Yes', 'not specified')
defaultto 'not specified'
end

newproperty(:web_authn_policy_passwordless_user_verification_requirement) do
desc 'webAuthnPolicyPasswordlessUserVerificationRequirement'
newvalues('required', 'preferred', 'discouraged', 'not specified')
defaultto 'not specified'
end

newproperty(:web_authn_policy_passwordless_create_timeout, parent: PuppetX::Keycloak::IntegerProperty) do
desc 'webAuthnPolicyPasswordlessCreateTimeout'
defaultto 0
end

newproperty(:web_authn_policy_passwordless_avoid_same_authenticator_register, boolean: true) do
desc 'webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister'
newvalues(:true, :false)
defaultto :false
end

newproperty(:web_authn_policy_passwordless_acceptable_aaguids, array_matching: :all, parent: PuppetX::Keycloak::ArrayProperty) do
desc 'webAuthnPolicyPasswordlessAcceptableAaguids'
defaultto []
end

newproperty(:custom_properties) do
desc 'custom properties to pass as realm configurations'
defaultto {}
Expand Down

0 comments on commit 2d2b37f

Please sign in to comment.