|
4 | 4 | // coldbox directives
|
5 | 5 | coldbox = {
|
6 | 6 | // Application Setup
|
7 |
| - appName : "Module Tester", |
| 7 | + appName : "Module Tester", |
8 | 8 | // Development Settings
|
9 |
| - reinitPassword : "", |
| 9 | + reinitPassword : "", |
10 | 10 | handlersIndexAutoReload : true,
|
11 | 11 | modulesExternalLocation : [],
|
12 | 12 | // Implicit Events
|
13 |
| - defaultEvent : "", |
14 |
| - requestStartHandler : "", |
15 |
| - requestEndHandler : "", |
| 13 | + defaultEvent : "", |
| 14 | + requestStartHandler : "", |
| 15 | + requestEndHandler : "", |
16 | 16 | applicationStartHandler : "",
|
17 |
| - applicationEndHandler : "", |
18 |
| - sessionStartHandler : "", |
19 |
| - sessionEndHandler : "", |
20 |
| - missingTemplateHandler : "", |
| 17 | + applicationEndHandler : "", |
| 18 | + sessionStartHandler : "", |
| 19 | + sessionEndHandler : "", |
| 20 | + missingTemplateHandler : "", |
21 | 21 | // Error/Exception Handling
|
22 |
| - exceptionHandler : "", |
23 |
| - onInvalidEvent : "", |
24 |
| - customErrorTemplate : "/coldbox/system/includes/BugReport.cfm", |
| 22 | + exceptionHandler : "", |
| 23 | + onInvalidEvent : "", |
| 24 | + customErrorTemplate : "/coldbox/system/includes/BugReport.cfm", |
25 | 25 | // Application Aspects
|
26 |
| - handlerCaching : false, |
27 |
| - eventCaching : false |
| 26 | + handlerCaching : false, |
| 27 | + eventCaching : false, |
| 28 | + autoMapModels : true |
28 | 29 | };
|
29 | 30 |
|
30 | 31 | // environment settings, create a detectEnvironment() method to detect it yourself.
|
|
41 | 42 | };
|
42 | 43 |
|
43 | 44 | // Register interceptors as an array, we need order
|
44 |
| - interceptors = [ |
45 |
| - // SES |
46 |
| - { class : "coldbox.system.interceptors.SES" } |
47 |
| - ]; |
| 45 | + interceptors = []; |
48 | 46 |
|
49 | 47 | // LogBox DSL
|
50 | 48 | logBox = {
|
51 | 49 | // Define Appenders
|
52 | 50 | appenders : {
|
53 | 51 | files : {
|
54 |
| - class : "coldbox.system.logging.appenders.RollingFileAppender", |
| 52 | + class : "coldbox.system.logging.appenders.RollingFileAppender", |
55 | 53 | properties : { filename : "tester", filePath : "/#appMapping#/logs" }
|
56 | 54 | },
|
57 |
| - console : { |
58 |
| - class : "coldbox.system.logging.appenders.ConsoleAppender" |
59 |
| - } |
| 55 | + console : { class : "coldbox.system.logging.appenders.ConsoleAppender" } |
60 | 56 | },
|
61 | 57 | // Root Logger
|
62 |
| - root : { levelmax : "DEBUG", appenders : "*" }, |
| 58 | + root : { levelmax : "DEBUG", appenders : "*" }, |
63 | 59 | // Implicit Level Categories
|
64 |
| - info : [ "coldbox.system" ], |
| 60 | + info : [ "coldbox.system" ], |
65 | 61 | debug : [ "cbsecurity" ]
|
66 | 62 | };
|
67 | 63 |
|
68 | 64 | // Module Settings
|
69 | 65 | moduleSettings = {
|
70 | 66 | // CB Auth
|
71 |
| - cbAuth : { |
72 |
| - userServiceClass : "UserService" |
73 |
| - }, |
| 67 | + cbAuth : { userServiceClass : "UserService" }, |
74 | 68 | // CB Security
|
75 | 69 | cbSecurity : {
|
76 | 70 | // Global Relocation when an invalid access is detected, instead of each rule declaring one.
|
77 |
| - "invalidAuthenticationEvent" : "main.index", |
| 71 | + "invalidAuthenticationEvent" : "main.index", |
78 | 72 | // Global override event when an invalid access is detected, instead of each rule declaring one.
|
79 |
| - "invalidAuthorizationEvent" : "main.index", |
| 73 | + "invalidAuthorizationEvent" : "main.index", |
80 | 74 | // Default invalid action: override or redirect when an invalid access is detected, default is to redirect
|
81 |
| - "defaultAuthorizationAction" : "redirect", |
| 75 | + "defaultAuthorizationAction" : "redirect", |
82 | 76 | // The WireBox ID of the authentication service to use in cbSecurity which must adhere to the cbsecurity.interfaces.IAuthService interface.
|
83 |
| - "authenticationService" : "authenticationService@cbauth", |
| 77 | + "authenticationService" : "authenticationService@cbauth", |
84 | 78 | // WireBox ID of the user service to use
|
85 |
| - "userService" : "UserService", |
| 79 | + "userService" : "UserService", |
86 | 80 | // Enable Visualizer
|
87 |
| - "enableSecurityVisualizer" : true, |
| 81 | + "enableSecurityVisualizer" : true, |
88 | 82 | // The global security rules
|
89 |
| - "rules" : [ |
| 83 | + "rules" : [ |
90 | 84 | // should use direct action and do a global redirect
|
91 | 85 | {
|
92 |
| - "whitelist": "", |
93 |
| - "securelist": "admin", |
94 |
| - "match": "event", |
95 |
| - "roles": "admin", |
96 |
| - "permissions": "", |
97 |
| - "action" : "redirect" |
| 86 | + "whitelist" : "", |
| 87 | + "securelist" : "admin", |
| 88 | + "match" : "event", |
| 89 | + "roles" : "admin", |
| 90 | + "permissions" : "", |
| 91 | + "action" : "redirect" |
98 | 92 | },
|
99 | 93 | // no action, use global default action
|
100 | 94 | {
|
101 |
| - "whitelist": "", |
102 |
| - "securelist": "noAction", |
103 |
| - "match": "url", |
104 |
| - "roles": "admin", |
105 |
| - "permissions": "" |
| 95 | + "whitelist" : "", |
| 96 | + "securelist" : "noAction", |
| 97 | + "match" : "url", |
| 98 | + "roles" : "admin", |
| 99 | + "permissions" : "" |
106 | 100 | },
|
107 | 101 | // Using overrideEvent only, so use an explicit override
|
108 |
| - { |
109 |
| - "securelist": "ruleActionOverride", |
110 |
| - "match": "url", |
111 |
| - "overrideEvent": "main.login" |
112 |
| - }, |
| 102 | + { "securelist" : "ruleActionOverride", "match" : "url", "overrideEvent" : "main.login" }, |
113 | 103 | // direct action, use global override
|
114 | 104 | {
|
115 |
| - "whitelist": "", |
116 |
| - "securelist": "override", |
117 |
| - "match": "url", |
118 |
| - "roles": "", |
119 |
| - "permissions": "", |
120 |
| - "action" : "override" |
| 105 | + "whitelist" : "", |
| 106 | + "securelist" : "override", |
| 107 | + "match" : "url", |
| 108 | + "roles" : "", |
| 109 | + "permissions" : "", |
| 110 | + "action" : "override" |
121 | 111 | },
|
122 | 112 | // Using redirect only, so use an explicit redirect
|
123 |
| - { |
124 |
| - "securelist": "ruleActionRedirect", |
125 |
| - "match": "url", |
126 |
| - "redirect": "main.login" |
127 |
| - } |
| 113 | + { "securelist" : "ruleActionRedirect", "match" : "url", "redirect" : "main.login" } |
128 | 114 | ],
|
129 | 115 | // JWT Settings
|
130 |
| - "jwt" : { |
131 |
| - "secretKey" : "C3D4AF35-8FCD-49AB-943A39AEFFB584EE", |
132 |
| - "customAuthHeader" : "x-auth-token", |
133 |
| - "expiration" : 60, |
134 |
| - "enableRefreshTokens" : false, |
135 |
| - "refreshExpiration" : 43200, |
136 |
| - "algorithm" : "HS512", |
137 |
| - "requiredClaims" : [ "role" ], |
138 |
| - "tokenStorage" : { |
139 |
| - "enabled" : true, |
140 |
| - "keyPrefix" : "cbjwt_", |
141 |
| - "driver" : "cachebox", |
142 |
| - "properties" : { |
143 |
| - "cacheName" : "default" |
144 |
| - } |
| 116 | + "jwt" : { |
| 117 | + "secretKey" : "C3D4AF35-8FCD-49AB-943A39AEFFB584EE", |
| 118 | + "customAuthHeader" : "x-auth-token", |
| 119 | + "expiration" : 60, |
| 120 | + "enableRefreshTokens" : false, |
| 121 | + "refreshExpiration" : 43200, |
| 122 | + "algorithm" : "HS512", |
| 123 | + "requiredClaims" : [ "role" ], |
| 124 | + "tokenStorage" : { |
| 125 | + "enabled" : true, |
| 126 | + "keyPrefix" : "cbjwt_", |
| 127 | + "driver" : "cachebox", |
| 128 | + "properties" : { "cacheName" : "default" } |
145 | 129 | }
|
146 | 130 | }
|
147 | 131 | }
|
|
0 commit comments