Commit 159dee2
committed
Support logging HTTP auth denial reason
## What?
Support logging (at INFO level) the reason provided by the HTTP auth backend why
authentication or autorisation was denied.
## Why?
* Security and compliance often require detailed logs of why access was denied
* Operational debugging: Operators see immediately in RabbitMQ logs why
authentication/authorization failed without checking the HTTP backend logs
## How?
The HTTP body returned by the HTTP auth server is allowed to be `deny <Reason>`
where `<Reason>` is any text that will be logged by RabbitMQ at INFO level.1 parent 742c179 commit 159dee2
File tree
3 files changed
+45
-21
lines changed- deps/rabbitmq_auth_backend_http
- src
- test
3 files changed
+45
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
Lines changed: 43 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
| |||
153 | 164 | | |
154 | 165 | | |
155 | 166 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
160 | 183 | | |
161 | 184 | | |
162 | | - | |
| 185 | + | |
| 186 | + | |
163 | 187 | | |
164 | 188 | | |
165 | 189 | | |
| |||
204 | 228 | | |
205 | 229 | | |
206 | 230 | | |
207 | | - | |
208 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
209 | 235 | | |
210 | 236 | | |
211 | 237 | | |
| |||
240 | 266 | | |
241 | 267 | | |
242 | 268 | | |
243 | | - | |
244 | | - | |
245 | 269 | | |
246 | 270 | | |
247 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
0 commit comments