-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.xml
142 lines (118 loc) · 4.63 KB
/
server.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<jerry>
<!--certificate domain="*" key="server.key" cert="server.pub"/-->
<http-context id="x">
<!--requesthandler implementation="jerry/filebrowser">
<parameter key="browsable" value="true"/>
<parameter key="ignoreError" value="true"/>
<parameter key="path" value="/tmp/"/>
</requesthandler-->
</http-context>
<http-client id="http-client-1">
<parameter key="url" value="https://www.heise.de"/>
</http-client>
<database id="my-db" implementation="esl/database/SQLiteConnectionFactory">
<parameter key="URI" value="file:my.db?mode=rw"/>
</database>
<http-context id="ref-context-http">
<context>
<!-- -------------- -->
<!-- Authentication -->
<!-- -------------- -->
<!--
<procedure id="authentication-basicauth-stable" implementation="jerry/authentication-basic-stable">
<parameter key="credential" value="Hans1:plain:Wurst991"/>
<parameter key="credential" value="Hans2:plain:Wurst992"/>
</procedure>
<procedure id="authentication-basicauth-dblookup" implementation="jerry/authentication-basic-dblookup">
<parameter key="connection-id" value="my-db"/>
<parameter key="sql" value="SELECT PASSWD FROM users WHERE USER_ID=?;"/>
<parameter key="lifetime-renew" value="true"/>
<parameter key="lifetime-ms" value="60000"/>
</procedure>
<procedure id="authentication-jwt" implementation="jerry/authentication-jwt">
</procedure>
<requesthandler implementation="jerry/authentication">
<parameter key="allow" value="basic"/>
<parameter key="allow" value="bearer"/>
<parameter key="authentication-procedure-id" value="authentication-basicauth-stable"/>
<parameter key="authentication-procedure-id" value="authentication-basicauth-dblookup"/>
<parameter key="authentication-procedure-id" value="authentication-jwt">
<parameter key="behavior" value="reply"/>
or: <parameter key="behavior" value="proceed"/>
or: <parameter key="behavior" value="disconnect"/>
</requesthandler>
-->
<response-header key="WWW-Authenticate" value="Basic realm="AuthArea""/>
<!--response-header key="WWW-Authenticate" value="Bearer realm="AuthArea""/-->
<!-- ------------- -->
<!-- Authorization -->
<!-- ------------- -->
<!--
<procedure id="get-my-roles" implementation="jerry/authorization-dblookup">
<parameter key="authorized-object-id" value="my-roles"/>
<parameter key="connection-id" value="my-db"/>
<parameter key="sql" value="SELECT IS_ADMIN, GRANT_USERS FROM users WHERE USER_ID=?;"/>
</procedure>
<procedure implementation="jerry/authorization-cache">
<parameter key="authorized-object-id" value="my-roles"/>
<parameter key="authorizing-procedure-id" value="get-my-roles"/>
<parameter key="lifetime-renew" value="false"/>
<parameter key="lifetime-ms" value="60000"/>
</procedure>
-->
</context>
<!--
<procedure id="sleep" implementation="jerry/sleep">
<parameter key="sleep-ms" value="1000"/>
</procedure>
-->
<!--procedure ref-id="sleep"/-->
<endpoint path="test1/log">
<endpoint path="mc-lukas">
<!--requesthandler implementation="jerry/filebrowser">
<parameter key="browsable" value="true"/>
<parameter key="path" value="/usr/"/>
</requesthandler-->
</endpoint>
<reference id="y" ref-id="x"/>
<context ref-id="y"/>
</endpoint>
<endpoint path="heise">
<!--requesthandler implementation="jerry/proxy">
<parameter key="http-client-id" value="http-client-1"/>
</requesthandler-->
</endpoint>
</http-context>
<http-server>
<parameter key="https" value="true"/>
<parameter key="threads" value="4"/>
<parameter key="port" value="8081"/>
<listener> <!-- same as context -->
<host server-name="*">
<context ref-id="ref-context-http"/>
</host>
</listener>
</http-server>
<!--
<object id="kafka-broker-1" implementation="esl/com/basic/broker/KafkaClient">
<parameter key="kafka.group.id" value="test"/>
<parameter key="kafka.bootstrap.servers" value="localhost:9092"/>
</object>
<procedure id="sleep-1" implementation="jerry/sleep">
<parameter key="sleep-ms" value="1000"/>
</procedure>
<procedure id="sleep-2" implementation="jerry/sleep">
<parameter key="sleep-ms" value="1000"/>
</procedure>
<procedure id="list" implementation="jerry/list">
<parameter key="procedure-id" value="sleep-1"/>
<parameter key="procedure-id" value="sleep-2"/>
</procedure>
<procedure implementation="jerry/list">
<parameter key="procedure-id" value="list"/>
</procedure>
-->
<!--batch-procedure implementation="jerry/list">
<parameter key="procedure-id" value="list"/>
</batch-procedure-->
</jerry>