You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

File Syntax

Basics

The authz and groups files are plain text files. The file is split into a number of sections with zero or more entries:

# Comment ...

[section]
key.1 = value
key.2 = multi-line
        value

Empty lines and lines that start with a ‘#’ in the first column are ignored.

A section starts with a left bracket ‘[’ in the first column and everything until the last right bracket ‘]’ in the line is the section name.

Entries are pairs of keys and values. The key must start in the first column of the line and must not contain spaces or the ‘=’ sign. The entry's value is everything from ‘=’ to the end of the line; spaces are removed from the start and end of the value. Values can be continued on the next line by indenting that line by one or more spaces. In multi-line values, all spaces from the end of the previous line to the first non-space character in the continuation line are compressed to a single space. In the example above, the value for key.1 is “value” and the value for key.2 is “multi-line value”; note the single space. Comments and empty lines are forbidden in multi-line values.

Formal Syntax Description (BNF)
<authz-file>   ::= <records>
<lines>        ::= <line> | <lines> <line>
<line>         ::= <empty-line> | <comment> | <section> | <entry> | <continuation>
<empty-line>   ::= <space>* <newline>
<comment>      ::= "#" <text> <newline>
<section>      ::= "[" <text> "]" <opt-space> <newline>
<entry>        ::= <key> <opt-space> "=" <text> <newline>
<continuation> ::= <space> <opt-space> <text-char> <text> <newline>


; Character classes
<whitespace>   ::= <BS> | <TAB> | <VT> | <FF> | <CR> | <SPC>
<newline>      ::= <LF>
<opt-space>    ::= <space> <opt-space> | ""
<text>         ::= <text> <text-char> | ""
<key>          ::= <key-char> | <key> <key-char>
<text-char>    ::= (any character except <newline>)
<non-space>    ::= (any <text-char> except <whitespace>)
<key-char>     ::= (any <non-space> except "#", "[" and "=")


; Character definitions (Unicode names)
<BS>           ::= U+0008    ; BACKSPACE
<TAB>          ::= U+0009    ; CHARACTER TABULATION
<LF>           ::= U+000A    ; LINE FEED
<VT>           ::= U+000B    ; LINE TABULATION
<FF>           ::= U+000C    ; FORM FEED
<CR>           ::= U+000D    ; CARRIAGE RETURN
<SPC>          ::= U+0020    ; SPACE


Groups

Aliases

Rules

HowTo

Validating In-Repository Authz Files


References

  • No labels