Skip to content

Commit c62ad73

Browse files
committed
ncm-metaconfig: httpd: support casscope
1 parent a7c44db commit c62ad73

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

ncm-metaconfig/src/main/metaconfig/httpd/2.4/tests/profiles/keystone.pan

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ prefix "contents";
2727
"type", "error",
2828
"expr", "%{cu}t %M",
2929
"name", "", # must be empty
30-
)),
30+
)),
3131
"error", "/var/log/httpd/keystone.log",
3232
"custom", list(dict(
3333
"location", "/var/log/httpd/keystone_access.log",
3434
"name", "combined",
35-
)),
36-
),
35+
)),
36+
),
3737
"wsgi", dict(
3838
"passauthorization", "on",
3939
"processgroup", "keystone-public",
@@ -46,19 +46,19 @@ prefix "contents";
4646
"user", "keystone",
4747
"group", "keystone",
4848
"display-name", "%{GROUP}",
49-
),
5049
),
5150
),
51+
),
5252
"aliases", list(dict(
5353
"url", "/",
5454
"destination", "/usr/bin/keystone-wsgi-public",
5555
"type", "wsgiscript",
56-
)),
56+
)),
5757
"directories", list(dict(
5858
"name", "/usr/bin",
5959
"authz", list(dict("all", "granted")),
60-
)),
61-
);
60+
)),
61+
);
6262
SELF['keystone'] = clone(data);
6363

6464
data['port'] = 35357;
@@ -79,8 +79,9 @@ prefix "contents";
7979
"passauthorization", "on",
8080
"processgroup", "keystone-public",
8181
"applicationgroup", "%{GLOBAL}",
82-
),
83-
);
82+
),
83+
"casscope", "/"
84+
);
8485
append(clone(data));
8586

8687
data['name'] = "/identity_admin";
@@ -96,4 +97,4 @@ prefix "contents";
9697
'action', 'add',
9798
'name', 'Strict-Transport-Security',
9899
'value', 'max-age=15768000'
99-
));
100+
));

ncm-metaconfig/src/main/metaconfig/httpd/2.4/tests/regexps/keystone/base

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Base test for keystone wsgi config
1313
^ wsgiapplicationgroup %\{GLOBAL\}
1414
^ wsgipassauthorization on
1515
^ wsgiprocessgroup keystone-public
16+
^ casscope /
1617
^</location>
1718
^<location /identity_admin>
1819
^ options \+ExecCGI
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[%- FOREACH casscope IN desc %]
2+
casscope casscope.path
3+
[%- END -%]

ncm-metaconfig/src/main/metaconfig/httpd/config/directory_basic.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ directoryindex [% desc.directoryindex.join(' ') %]
55
[%- IF desc.exists('limitrequestbody') %]
66
limitrequestbody [% desc.limitrequestbody %]
77
[% END -%]
8-
[%- to_process = ['rewrite', 'handler', 'perl', 'outputfilter', 'env', 'limit', 'proxy', 'wsgi', 'expires'] -%]
8+
[%- to_process = ['rewrite', 'handler', 'perl', 'outputfilter', 'env', 'limit', 'proxy', 'wsgi', 'expires', 'casscope'] -%]
99
[%- FOREACH p IN to_process -%]
1010
[%- IF desc.exists(p) -%]
1111
[% INCLUDE "metaconfig/httpd/config/${p}.tt" desc=desc.$p %]

ncm-metaconfig/src/main/metaconfig/httpd/pan/schema.pan

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,9 @@ type httpd_expires = {
594594
"default" ? string
595595
"bytype" ? string{}
596596
};
597+
type httpd_casscope = {
598+
"path" : string
599+
}
597600

598601
type httpd_directory = {
599602
include httpd_file
@@ -610,6 +613,7 @@ type httpd_directory = {
610613
"davrods" ? httpd_davrods
611614
"files" ? httpd_file[]
612615
"expires" ? httpd_expires
616+
"casscope" ? httpd_casscope
613617
};
614618

615619
type httpd_vhost_ip = string with is_ip(SELF) || SELF == '*';

0 commit comments

Comments
 (0)