Commit 0b586c2
Adding a warning header when a license is about to expire (#64948)
* This change adds a warning header when a license is about to expire
Resolves #60562
* This change adds realm name of the realm used to perform authentication to the responses of _security/oidc/authenticate and _security/oidc/authenticate APIs
Resolves #53161
* Adding doc for the new API introduced by #64517 - /_security/saml/metadata/{realm}
Related to #49018
* Adding a warning header when a license is about to expire
Resolves #60562
* Addressing the PR feedback
* Switching back to adding the header during featureCheck to allow
warnings when authentication is disabled as well. Adding filterHeader
implementation to SecurityRestFilter exception handling to remove all
the warnings if authentication fails.
* Changing the wording for "expired" message to be consistent with the log
messages; changing "today" calculation; adding a test case for failing
authN to make sure we remove the warning header
* Small changes in the way we verify header in tests
* Nit changes
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>1 parent 1cf0a6e commit 0b586c2
File tree
18 files changed
+212
-57
lines changed- server/src/main/java/org/elasticsearch
- http
- rest
- x-pack/plugin
- core/src
- main/java/org/elasticsearch/license
- test/java/org/elasticsearch
- license
- test
- identity-provider/src/test/java/org/elasticsearch/xpack/idp/saml/rest/action
- ml/src/internalClusterTest/java/org/elasticsearch/license
- security/src
- internalClusterTest/java/org/elasticsearch/license
- main/java/org/elasticsearch/xpack/security/rest
- test/java/org/elasticsearch/xpack/security
- authc/support
- authz/store
- rest/action/saml
- spatial/src/test/java/org/elasticsearch/xpack/spatial
18 files changed
+212
-57
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
127 | | - | |
| 132 | + | |
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
| |||
475 | 480 | | |
476 | 481 | | |
477 | 482 | | |
478 | | - | |
| 483 | + | |
479 | 484 | | |
480 | 485 | | |
481 | 486 | | |
| |||
488 | 493 | | |
489 | 494 | | |
490 | 495 | | |
491 | | - | |
| 496 | + | |
492 | 497 | | |
493 | 498 | | |
494 | 499 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 35 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| 37 | + | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
| |||
395 | 401 | | |
396 | 402 | | |
397 | 403 | | |
398 | | - | |
| 404 | + | |
399 | 405 | | |
400 | 406 | | |
401 | 407 | | |
| |||
404 | 410 | | |
405 | 411 | | |
406 | 412 | | |
407 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
408 | 417 | | |
409 | 418 | | |
| 419 | + | |
410 | 420 | | |
411 | 421 | | |
412 | 422 | | |
| |||
420 | 430 | | |
421 | 431 | | |
422 | 432 | | |
423 | | - | |
| 433 | + | |
424 | 434 | | |
425 | 435 | | |
426 | 436 | | |
| |||
468 | 478 | | |
469 | 479 | | |
470 | 480 | | |
| 481 | + | |
471 | 482 | | |
472 | 483 | | |
473 | 484 | | |
474 | 485 | | |
475 | | - | |
476 | | - | |
| 486 | + | |
| 487 | + | |
477 | 488 | | |
478 | 489 | | |
479 | 490 | | |
| |||
509 | 520 | | |
510 | 521 | | |
511 | 522 | | |
| 523 | + | |
512 | 524 | | |
513 | 525 | | |
514 | 526 | | |
| 527 | + | |
| 528 | + | |
515 | 529 | | |
516 | 530 | | |
517 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
518 | 543 | | |
519 | 544 | | |
520 | 545 | | |
| |||
631 | 656 | | |
632 | 657 | | |
633 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
634 | 664 | | |
635 | 665 | | |
636 | 666 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
369 | | - | |
| 370 | + | |
370 | 371 | | |
371 | 372 | | |
| 373 | + | |
372 | 374 | | |
373 | 375 | | |
374 | 376 | | |
375 | 377 | | |
376 | 378 | | |
377 | | - | |
| 379 | + | |
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
| |||
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
390 | | - | |
391 | | - | |
| 392 | + | |
| 393 | + | |
392 | 394 | | |
393 | 395 | | |
394 | 396 | | |
| |||
0 commit comments