forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Security Tokens moved to a new separate index (elastic#40742)
This commit introduces the `.security-tokens` and `.security-tokens-7` alias-index pair. Because index snapshotting is at the index level granularity (ie you cannot snapshot a subset of an index) snapshoting .`security` had the undesirable effect of storing ephemeral security tokens. The changes herein address this issue by moving tokens "seamlessly" (without user intervention) to another index, so that a "Security Backup" (ie snapshot of `.security`) would not be bloated by ephemeral data.
- Loading branch information
1 parent
fe5789a
commit 189c5b8
Showing
50 changed files
with
2,024 additions
and
847 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...in/resources/security-index-template.json → .../resources/security-index-template-7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
x-pack/plugin/core/src/main/resources/security-tokens-index-template-7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"index_patterns" : [ ".security-tokens-7" ], | ||
"order" : 1000, | ||
"settings" : { | ||
"number_of_shards" : 1, | ||
"number_of_replicas" : 0, | ||
"auto_expand_replicas" : "0-1", | ||
"index.priority": 1000, | ||
"index.format": 7 | ||
}, | ||
"mappings" : { | ||
"_doc" : { | ||
"_meta": { | ||
"security-version": "${security.template.version}" | ||
}, | ||
"dynamic" : "strict", | ||
"properties" : { | ||
"doc_type" : { | ||
"type" : "keyword" | ||
}, | ||
"creation_time" : { | ||
"type" : "date", | ||
"format" : "epoch_millis" | ||
}, | ||
"refresh_token" : { | ||
"type" : "object", | ||
"properties" : { | ||
"token" : { | ||
"type" : "keyword" | ||
}, | ||
"refreshed" : { | ||
"type" : "boolean" | ||
}, | ||
"refresh_time": { | ||
"type": "date", | ||
"format": "epoch_millis" | ||
}, | ||
"superseded_by": { | ||
"type": "keyword" | ||
}, | ||
"invalidated" : { | ||
"type" : "boolean" | ||
}, | ||
"client" : { | ||
"type" : "object", | ||
"properties" : { | ||
"type" : { | ||
"type" : "keyword" | ||
}, | ||
"user" : { | ||
"type" : "keyword" | ||
}, | ||
"realm" : { | ||
"type" : "keyword" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"access_token" : { | ||
"type" : "object", | ||
"properties" : { | ||
"user_token" : { | ||
"type" : "object", | ||
"properties" : { | ||
"id" : { | ||
"type" : "keyword" | ||
}, | ||
"expiration_time" : { | ||
"type" : "date", | ||
"format" : "epoch_millis" | ||
}, | ||
"version" : { | ||
"type" : "integer" | ||
}, | ||
"metadata" : { | ||
"type" : "object", | ||
"dynamic" : false | ||
}, | ||
"authentication" : { | ||
"type" : "binary" | ||
} | ||
} | ||
}, | ||
"invalidated" : { | ||
"type" : "boolean" | ||
}, | ||
"realm" : { | ||
"type" : "keyword" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.