2020-12-10 18:10:16 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# rubocop:disable Rails/Output
|
|
|
|
module Gitlab
|
2021-08-17 09:10:02 +00:00
|
|
|
class EncryptedLdapCommand < EncryptedCommandBase
|
|
|
|
DISPLAY_NAME = "LDAP"
|
|
|
|
EDIT_COMMAND_NAME = "gitlab:ldap:secret:edit"
|
2020-12-10 18:10:16 +00:00
|
|
|
|
2021-08-17 09:10:02 +00:00
|
|
|
class << self
|
|
|
|
def encrypted_secrets
|
|
|
|
Gitlab::Auth::Ldap::Config.encrypted_secrets
|
2020-12-10 18:10:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def encrypted_file_template
|
|
|
|
<<~YAML
|
|
|
|
# main:
|
|
|
|
# password: '123'
|
2022-05-16 06:08:30 +00:00
|
|
|
# bind_dn: 'gitlab-adm'
|
2020-12-10 18:10:16 +00:00
|
|
|
YAML
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# rubocop:enable Rails/Output
|