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

Compare with Current View Page History

« Previous Version 26 Next »

Under Construction


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 the ‘=’ 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 within multi-line values.

Formal Syntax Description (BNF)
<authz-file>   ::= <records>
<records>      ::= <record> | <records> <record>
<record>       ::= <empty> | <comment> | <section> | <entry>
<empty>        ::= <opt-space> <line-end>
<comment>      ::= "#" <opt-text> <line-end>
<section>      ::= "[" <text> "]" <opt-space> <line-end>
<entry>        ::= <key-value> | <entry> <continuation>
<key-value>    ::= <key> <opt-space> <key-sep> <opt-text> <line-end>
<continuation> ::= <space> <text> <line-end>

<line-end>     ::= <LF> | <end-of-file>
<space>        ::= <space-char> | <space> <space-char>
<text>         ::= <non-space> | <text> <text-char>
<key>          ::= <key-start> | <key-start> <key-cont> <key-end>
<key-cont>     ::= <key-char> | <key-cont> <key-char> | ""
<opt-space>    ::= <space> | ""
<opt-text>     ::= <text> | <space> <text> | ""
<end-of-file>  ::= (the end of the file)

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

; Characters (ASCII and 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