summaryrefslogtreecommitdiff
path: root/config/meson.build
diff options
context:
space:
mode:
authorMarco Kawajiri <kawajiri@meta.com>2023-10-31 23:36:58 +0300
committerEd Tanous <ed@tanous.net>2023-12-09 01:59:39 +0300
commit0e373b53f81fc1720050571755ecfcdc6dd9ba9b (patch)
tree2aef16a7aca2a2bc12e7b086ebdde17b178daf14 /config/meson.build
parent23f1c96e6bc9060b54ff08a6b4d6cf8b8e0c3b23 (diff)
downloadbmcweb-0e373b53f81fc1720050571755ecfcdc6dd9ba9b.tar.xz
mutual-tls: Add support for Meta certificates
Meta Inc's client certificates use an internal Subject CN format which AFAIK is specific to Meta and don't adhere to a known standard: Subject: CN = <type>:<entity>/<hostname> Commit adds the `mutual-tls-common-name-parsing=meta` option to, on Meta builds, parse the Subject CN field and map either the <entity> to a local user. The <type> field determines what kind of client identity the cert represents. Only type="user" is supported for now with <entity> being the unixname of a Meta employee. For example, the Subject CN string below maps to a local BMC user named "kawmarco": Subject CN = "user:kawmarco/dev123.facebook.com" Tested: Unit tests, built and tested on romulus using the script below: https://gist.github.com/kawmarco/87170a8250020023d913ed5f7ed5c01f Flags used in meta-ibm/meta-romulus/conf/layer.conf : ``` -Dbmcweb-logging='enabled' -Dmutual-tls-common-name-parsing='meta' ``` Change-Id: I35ee9b92d163ce56815a5bd9cce5296ba1a44eef Signed-off-by: Marco Kawajiri <kawajiri@meta.com>
Diffstat (limited to 'config/meson.build')
-rw-r--r--config/meson.build3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/meson.build b/config/meson.build
index 10ddb2dff2..1ba34afac9 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -20,6 +20,8 @@ enable_multi_host = get_option('experimental-redfish-multi-computer-system')
conf_data.set10('BMCWEB_ENABLE_MULTI_HOST', enable_multi_host.allowed())
enable_http2 = get_option('experimental-http2')
conf_data.set10('BMCWEB_ENABLE_HTTP2', enable_http2.allowed())
+conf_data.set10('BMCWEB_ENABLE_MTLS_COMMON_NAME_PARSING_META', get_option('mutual-tls-common-name-parsing') == 'meta')
+
# Logging level
loglvlopt = get_option('bmcweb-logging')
@@ -59,4 +61,3 @@ install_data(
install_dir: '/etc/pam.d/',
rename: 'webserver',
)
-