it is just display name
07/18/2022, 6:06 PMgitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
gitlab_rails['omniauth_block_auto_created_users'] = true
gitlab_rails['omniauth_auto_link_saml_user'] = true
gitlab_rails['omniauth_providers'] = [
{
name: "saml",
label: "Provider name", # optional label for login button, defaults to "Saml"
args: {
allowed_clock_drift: 1, # for one second clock drift
attribute_statements: { nickname: ['username'] },
assertion_consumer_service_url: "<https://gitlab.example.com/users/auth/saml/callback>",
idp_cert_fingerprint: "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
idp_sso_target_url: "<https://login.example.com/idp>",
issuer: "<https://gitlab.example.com>",
name_identifier_format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
}
}
]
I created a the following Puppet yaml file
gitlab::gitlab_rails:
omniauth_allow_single_sign_on: ['saml']
omniauth_auto_link_saml_user: true
omniauth_block_auto_created_users: true
omniauth_providers: [{name: "saml", label: "NRAS Token", args: {allowed_clock_drift: 1, attribute_statements: { nickname: ['username'] }, assertion_consumer_service_url: "<https://gitlab.example.com/users/auth/saml/callback>", idp_cert_fingerprint: "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8", idp_sso_target_url: "<https://login.example.com/idp>", issuer: "<https://gitlab.example.com>", name_identifier_format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"}}]
which caused Puppet to generate the following file:
gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
gitlab_rails['omniauth_auto_link_saml_user'] = true
gitlab_rails['omniauth_block_auto_created_users'] = true
gitlab_rails['omniauth_providers'] = [{"args"=>{"allowed_clock_drift"=>2, "assertion_consumer_service_url"=>"<https://gitlab.example.com/users/auth/saml/callback>", "attribute_statements"=>{"nickname"=>["username"]}, "idp_cert_fingerprint"=>"43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8", "idp_sso_target_url"=>"<https://login.example.com/idp>", "issuer"=>"<https://gitlab.example.com>", "name_identifier_format"=>"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"}, "label"=>"Provider name", "name"=>"saml"}]
The generated file is fine except for the last line, 'omniauth_providers'. It doesn't match completely with the desired one:
1) argument names are double-quoted when they should not.
2) argument names and values are separated by '=>' instead of ': ' (colon blank)
What is the correct Puppet syntax to use that eliminated the above two mismatches?it is just display name
07/18/2022, 6:08 PMgitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
gitlab_rails['omniauth_block_auto_created_users'] = true
gitlab_rails['omniauth_auto_link_saml_user'] = true
gitlab_rails['omniauth_providers'] = [
{
name: "saml",
label: "Provider name", # optional label for login button, defaults to "Saml"
args: {
allowed_clock_drift: 1, # for one second clock drift
attribute_statements: { nickname: ['username'] },
assertion_consumer_service_url: "<https://gitlab.example.com/users/auth/saml/callback>",
idp_cert_fingerprint: "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
idp_sso_target_url: "<https://login.example.com/idp>",
issuer: "<https://gitlab.example.com>",
name_identifier_format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
}
}
]
I created a the following Puppet yaml file
gitlab::gitlab_rails:
omniauth_allow_single_sign_on: ['saml']
omniauth_auto_link_saml_user: true
omniauth_block_auto_created_users: true
omniauth_providers: [{name: "saml", label: "NRAS Token", args: {allowed_clock_drift: 1, attribute_statements: { nickname: ['username'] }, assertion_consumer_service_url: "<https://gitlab.example.com/users/auth/saml/callback>", idp_cert_fingerprint: "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8", idp_sso_target_url: "<https://login.example.com/idp>", issuer: "<https://gitlab.example.com>", name_identifier_format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"}}]
which caused Puppet to generate the following file:
gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
gitlab_rails['omniauth_auto_link_saml_user'] = true
gitlab_rails['omniauth_block_auto_created_users'] = true
gitlab_rails['omniauth_providers'] = [{"args"=>{"allowed_clock_drift"=>2, "assertion_consumer_service_url"=>"<https://gitlab.example.com/users/auth/saml/callback>", "attribute_statements"=>{"nickname"=>["username"]}, "idp_cert_fingerprint"=>"43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8", "idp_sso_target_url"=>"<https://login.example.com/idp>", "issuer"=>"<https://gitlab.example.com>", "name_identifier_format"=>"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"}, "label"=>"Provider name", "name"=>"saml"}]
The generated file is fine except for the last line, 'omniauth_providers'. It doesn't match completely with the desired one:
1) argument names are double-quoted when they should not.
2) argument names and values are separated by '=>' instead of ': ' (colon blank)
What is the correct Puppet syntax to use that eliminated the above two mismatches?Lumiere
07/18/2022, 6:36 PMkenyon
07/18/2022, 8:39 PMkenyon
07/18/2022, 8:40 PMSlackbot
07/18/2022, 11:37 PMPaul Gureghian
07/19/2022, 12:37 AMSarah Tran
07/19/2022, 12:39 AMPaul Gureghian
07/19/2022, 12:39 AMvchepkov
07/19/2022, 12:40 AMvchepkov
07/19/2022, 12:40 AMvchepkov
07/19/2022, 12:41 AMPaul Gureghian
07/19/2022, 12:43 AMvchepkov
07/19/2022, 12:44 AMvchepkov
07/19/2022, 12:46 AMPaul Gureghian
07/19/2022, 12:46 AMvchepkov
07/19/2022, 12:48 AMPaul Gureghian
07/19/2022, 12:49 AMvchepkov
07/19/2022, 12:49 AMPaul Gureghian
07/19/2022, 12:49 AMvchepkov
07/19/2022, 12:50 AMvchepkov
07/19/2022, 12:51 AMvchepkov
07/19/2022, 12:52 AMPaul Gureghian
07/19/2022, 1:34 AMPaul Gureghian
07/19/2022, 4:07 AMYorokobi
07/19/2022, 4:09 AM/opt/puppetlabs/bin to the $PATH variable. export PATH=$PATH:/opt/puppetlabs/bin
Sometimes this is done automatically and all you have to do is logout and back in or run bashSlackbot
07/19/2022, 1:12 PMvchepkov
07/19/2022, 1:31 PMvchepkov
07/19/2022, 1:34 PMrunlolarun
07/19/2022, 1:56 PM