YAML
YAML is a standard configuration file format and is used in Panopticon’s <appdata>/security.yml file. Technically it’s equivalent to the Java properties file format but has the advantage of being easier to read (for humans) and avoids a lot of repetition.
A YAML file is just a text file that you can edit with any text editor but note that in YAML indentation has meaning. Be careful to preserve indentation (i.e., spaces at the start of lines) when you edit or copy YAML. YAML also has facilities to break long values over multiple lines and other nice features.
See https://en.wikipedia.org/wiki/YAML for more information.
Here’s an example of some properties in a Java properties file:
access.default.roles=VIEWER
access.designer.groups=analysts,reviewers
access.designer.users=bob@company.org
YAML uses colon to separate names and values, but that’s really all you need to change to convert to a valid YAML file:
access.default.roles: VIEWER
access.designer.groups: analysts, reviewers
access.designer.users: bob@company.org
YAML lets you collect a common name prefix on one line, if you indent the lines below. So, this is equivalent to the preceding:
access:
default.roles: VIEWER
designer.groups: analysts, reviewers
designer.users: bob@company.org
You can keep doing this:
access:
default.roles: VIEWER
designer:
groups: analysts, reviewers
users: bob@company.org
This saves a lot of space and makes the configuration easier to read. Especially when you have long property names as Spring Security seems to favor, for example:
spring.security:
saml2.relyingparty.registration:
okta-saml:
assertingparty:
metadata-uri: https://server.com/metadata
signing.credentials:
private-key-location: /etc/key.pem
certificate-location: /etc/cert.p12
The corresponding Java properties:
spring.security.saml2.relyingparty.registration.okta-
saml.assertingparty.metadata-uri=https\://server.com/metadata
spring.security.saml2.relyingparty.registration.okta-
saml.signing.credentials.private-key-location=/etc/key.pem
spring.security.saml2.relyingparty.registration.okta-
saml.signing.credentials.certificate-location=/etc/cert.p12
(c) 2013-2024 Altair Engineering Inc. All Rights Reserved.