Buckets:
AnonymousSpottedToad/human_verified_bucket / security_patterns /verifiable_token_based_authentication /04_pattern.json
| { | |
| "name": "Verifiable token-based authentication", | |
| "summary": "A subject is identified by the system based on a token provided by the subject that contains sufficient information to determine the correct principal. The system will typically not keep track of issued tokens, but does verify the validity of received tokens. A common example is JSON Web Tokens (JWT) that contain, for instance, the username and role of the subject, along with a digital signature or MAC to verify the token's integrity.", | |
| "roles": [ | |
| { | |
| "name": "Subject", | |
| "type": "Entity", | |
| "required": false, | |
| "description": "that requests the `System` to perform an action" | |
| }, | |
| { | |
| "name": "Enforcer", | |
| "type": "Enforcement point", | |
| "required": true, | |
| "description": "ensures the requested action is only performed if the `Subject` is successfully authenticated, this entity must be incorporated into the system" | |
| }, | |
| { | |
| "name": "Verifier", | |
| "type": "Decision point", | |
| "required": true, | |
| "description": "manages the verification of whether a token is valid" | |
| }, | |
| { | |
| "name": "Key manager", | |
| "type": "Entity", | |
| "required": true, | |
| "description": "manages the cryptographic keys necessary to generate and verify tokens" | |
| }, | |
| { | |
| "name": "Cryptographer", | |
| "type": "Cryptographic primitive", | |
| "required": true, | |
| "description": "provides the cryptographic primitives to verify the integrity of a token and generate the cryptographic element necessary for this verification when a token is generated" | |
| }, | |
| { | |
| "name": "System", | |
| "type": "Entity", | |
| "required": false, | |
| "description": "contains the business logic corresponding to the requested action" | |
| } | |
| ], | |
| "behaviour": [ | |
| { | |
| "step": "1", | |
| "from": "Subject", | |
| "to": "Enforcer", | |
| "kind": "action", | |
| "element": "action(token[, args])", | |
| "description": "The `Subject` requests an action from the `System` and provides a token as proof of its claimed identity. The `Enforcer` may return an error message informing the receiving entity its request was not granted." | |
| }, | |
| { | |
| "step": "2", | |
| "from": "Enforcer", | |
| "to": "Verifier", | |
| "kind": "action", | |
| "element": "verify(token)", | |
| "description": "The `Enforcer` intercepts the `Subject`'s requests and forwards the `token` to the `Verifier` for verification. If the token is untampered, the `Verifier` performs further check to ensure it is valid, e.g. ensure the token is not yet expired. If all checks succeed the `Verifier` extracts the `Subject`'s principal, and if present also further arguments, from the token and returns it to the `Enforcer`." | |
| }, | |
| { | |
| "step": "3", | |
| "from": "Verifier", | |
| "to": "Key manager", | |
| "kind": "action", | |
| "element": "get_verification_key(token)", | |
| "description": "The `Verifier` requests the cryptographic key necessary to verify the token's integrity from the `Key manager`. The `Key manager` retrieves the appropriate cryptographic key and replies it to the `Verifier`." | |
| }, | |
| { | |
| "step": "4", | |
| "from": "Verifier", | |
| "to": "Cryptographer", | |
| "kind": "action", | |
| "element": "verify_integrity(verKeyInf, token)", | |
| "description": "The `Verifier` forwards the received token and verification key to `Cryptographer` to verify the token's integrity, i.e. ensure it has not been tampered with. `Cryptographer` performs the necessary check to ensure that the token was not tampered with, i.e. check the MAC or verify the digital signature." | |
| }, | |
| { | |
| "step": "5", | |
| "from": "Enforcer", | |
| "to": "System", | |
| "kind": "action", | |
| "element": "action(principal[, t_args][, args])", | |
| "description": "The `Enforcer` forwards the `Subject`'s action request, with the `token` now replaced by the associated `principal`, to the `System` for further processing." | |
| }, | |
| { | |
| "step": "6", | |
| "from": "System", | |
| "to": "Subject", | |
| "kind": "data", | |
| "element": "reply", | |
| "description": "The `System` may reply to the `Subject`, for example, to provide the result of the action or confirm the request was received and/or executed. This reply does not need to pass through the `Enforcer`. (Optional)" | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 4.33 kB
- Xet hash:
- 338246fac57b0f2a4ab56bfa55b1643174bc4340b06a09248c5f67eba6170512
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.