-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ncm-metaconfig: ssh daemon configuration support #1377
Changes from all commits
273d4ac
5303dda
3114ea6
026aab3
29f80ab
7391554
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
unique template metaconfig/ssh/server_config; | ||
|
||
include 'metaconfig/ssh/schema'; | ||
|
||
bind "/software/components/metaconfig/services/{/etc/ssh/sshd_config}/contents" = sshd_config_file; | ||
|
||
prefix "/software/components/metaconfig/services/{/etc/ssh/sshd_config}"; | ||
"module" = "ssh/server"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
[% INCLUDE metaconfig/ssh/server_attrs.tt data=main -%] | ||
|
||
[% FOREACH mt IN Match -%] | ||
Match [% mt.matches.join(' ') %] | ||
[% INCLUDE metaconfig/ssh/server_attrs.tt data=mt FILTER indent %] | ||
[% END -%] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[% spacelist = ['AcceptEnv', 'AllowGroups', 'AllowUsers', 'AuthenticationMethods', 'AuthorizedKeysFile', 'AuthorizedPrincipalsFile', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this seems the longest list; use this as the default list fallback |
||
'DenyGroups', 'DenyUsers', | ||
'IPQoS', | ||
'PermitListen', 'PermitOpen', | ||
'RekeyLimit' ] -%] | ||
[% commalist = ['Ciphers', 'HostKeyAlgorithms', 'HostbasedAcceptedKeyTypes', 'KexAlgorithms', 'MACs', 'PubkeyAcceptedKeyTypes' ] -%] | ||
[% multilinelist = ['HostKey', 'ListenAddress', 'Port' ] -%] | ||
|
||
[%- FOREACH pair IN data.pairs -%] | ||
[% NEXT IF pair.key == 'matches' -%] | ||
[% IF pair.value.is_boolean -%] | ||
[% pair.key %] [% pair.value ? 'Yes' : 'No' %] | ||
[% NEXT -%] | ||
[% END -%] | ||
[% SWITCH pair.key -%] | ||
[% CASE spacelist -%] | ||
[% pair.key %] [% pair.value.join(' ') %] | ||
[% CASE commalist -%] | ||
[% pair.key %] [% pair.value.join(',') %] | ||
[% CASE multilinelist -%] | ||
[% FOREACH line IN pair.value -%] | ||
[% pair.key %] [% line %] | ||
[% END -%] | ||
[% CASE 'Subsystem' -%] | ||
[% FOREACH item IN pair.value.pairs -%] | ||
Subsystem [% item.key %] [% item.value %] | ||
[% END -%] | ||
[% CASE 'SetEnv' -%] | ||
[% FOREACH item IN pair.value.pairs -%] | ||
SetEnv [% item.key %]="[% item.value %]" | ||
[% END -%] | ||
[% CASE -%] | ||
[% pair.key %] [% pair.value %] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or do the boolean check here, and maybe add a the most common type pf list and have that here as default list format (saves you another static list) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
[% END -%] | ||
[% END -%] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gombasg why did you choose this so freeform? why not a list of dicts wit allowed keys and arbitrary values?