Open victorrodriguez1984 opened 1 year ago
Hello,
Does anybody have any news on this?
Thanks, Andras
hi @andraspavelbaystream , i got mine working with this
type: "config"
config_version: 2
config:
dynamic:
http:
anonymous_auth_enabled: false
xff:
enabled: false
internalProxies: '10\.\d{1-3}\.\d{1-3}\.\d{1-3}' # regex pattern
authc:
basic_internal_auth_domain:
http_enabled: true
transport_enabled: true
order: 0
http_authenticator:
type: basic
challenge: false
authentication_backend:
type: internal
openid_auth_domain:
http_enabled: true
transport_enabled: true
order: 1
http_authenticator:
type: openid
challenge: false
config:
subject_key: preferred_username
roles_key: roles
openid_connect_url: <redacted>
authentication_backend:
type: noop
This might be more of a documentation issue than a Wazuh issue... I was able to get mine working with the following and EntraID as my IDP: The below config gets Wazuh dashboard fully supporting both basic auth, and OpenID Connect.
config.yml
_meta:
type: "config"
config_version: 2
config:
dynamic:
http:
anonymous_auth_enabled: false
xff:
enabled: false
authc:
openid_auth_domain:
http_enabled: true
transport_enabled: true
order: 1
http_authenticator:
type: openid
challenge: false
config:
subject_key: preferred_username
roles_key: roles
openid_connect_url: {App Registrations > Overview > Endpoints > OpenID Connect metadata document}
openid_connect_idp:
enable_ssl: true
verify_hostnames: true
#pemtrustedcas_filepath: /etc/opensearch/opensearch-security/DigiCertGlobalRootCA.crt.pem
pemtrustedcas_content: |-
-----BEGIN CERTIFICATE-----
{Certificate}
-----END CERTIFICATE-----
authentication_backend:
type: noop
{Other methods}
basic_internal_auth_domain:
description: "Authenticate via HTTP Basic against internal users database"
http_enabled: true
transport_enabled: true
order: 3
http_authenticator:
type: basic
challenge: false
authentication_backend:
type: internal
opensearch_dashboards.yml
server.host: 0.0.0.0
opensearch.hosts: https://127.0.0.1:9200
server.port: 443
# opensearch.username: kibanaserver
# opensearch.password: kibanaserver
uiSettings.overrides.defaultRoute: /app/wz-home
# Security settings
opensearch_security.cookie.secure: true
opensearch.requestHeadersAllowlist: ["securitytenant","Authorization"]
opensearch_security.multitenancy.enabled: false
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
# TLS communication from Dashboards to cluster
opensearch.ssl.verificationMode: certificate
opensearch.ssl.certificateAuthorities: ["/etc/wazuh-dashboard/certs/root-ca.pem"]
# TLS communication from clients to Dashboards
server.ssl.enabled: true
server.ssl.key: "/etc/wazuh-dashboard/certs/wazuh.key"
server.ssl.certificate: "/etc/wazuh-dashboard/certs/wazuh.crt"
server.ssl.certificateAuthorities: "/etc/wazuh-dashboard/certs/combined-ca.pem"
## OpenID Authentication (SSO)
opensearch_security.auth.multiple_auth_enabled: true
opensearch_security.auth.type: ["openid","basicauth"]
opensearch_security.openid.base_redirect_url: "{Wazuh URL}"
opensearch_security.openid.connect_url: "{App Registrations > Overview > Endpoints > OpenID Connect metadata document}"
opensearch_security.openid.client_id: "{App Registrations > Overview > Application (client) ID}"
opensearch_security.openid.client_secret: "{App Registrations > Certificates & secrets > Value}"
opensearch_security.openid.root_ca: "/etc/wazuh-dashboard/certsDigiCertGlobalRootCA.crt.pem"
Version: tested on 4.3.9 and 4.3.10
Issue: OpenID config based in Opensearch documentation does not work https://opensearch.org/docs/latest/security-plugin/configuration/openid-connect/ https://www.linkedin.com/pulse/integrate-opensearch-azure-active-directory-dimitris-p-/
"Too many redirects" wazuh redirect to OIDC but loops starting again
I tested with LoadBalancer, internally with proxy and without proxy...here dashboard logs...
Configuration:
Mount config.yaml as configmap does not overwrite order, they keep sticky of Wazuh Management
Tested: Opensearch Doc for OpenID support overwritting config.yaml does not overwrite orders Reviw wazuh slack channels with some topics related