-
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.
- Loading branch information
1 parent
d327350
commit 586e6bc
Showing
1 changed file
with
45 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,57 @@ | ||
# Motivation | ||
|
||
Server to server calls for highly confidential data | ||
|
||
```mermaid | ||
sequenceDiagram | ||
User->>CLJS SPA: Clicks "Fetch Secret" | ||
CLJ Service->>Third-Party-REST-API: Fetch secret | ||
Note left of CLJ Service: TLS | ||
Note left of Third-Party-REST-API: TLS | ||
Third-Party-REST-API->>CLJ Service: secret | ||
Note over CLJ Service: Clear text | ||
CLJ Service->>CLJS SPA: secret | ||
CLJS SPA->>User: Show secret | ||
``` | ||
|
||
## Security Problem | ||
|
||
The S E C R E T is visible on the server. Trust is required between the two parties. | ||
|
||
## Conceptual Security Solution | ||
|
||
```mermaid | ||
sequenceDiagram | ||
User->>CLJS SPA: Clicks "Fetch Secret" | ||
CLJS SPA->>ok2cry: updatePayload | ||
ok2cry->>ok2cry: Create Key Pair | ||
ok2cry->>CLJS SPA: payload and Public Key | ||
CLJS SPA->>CLJ Service: Send Request with Public Key | ||
rect rgb(0, 155, 0) | ||
Note left of CLJ Service: TLS | ||
end | ||
rect rgb(0, 155, 0) | ||
Note right of CLJ Service: TLS | ||
end | ||
Third-Party-REST-API->>CLJ Service: * * S E C R E T * * | ||
rect rgb(120, 10, 10) | ||
Note over CLJ Service: Clear text | ||
end | ||
CLJ Service->>CLJS SPA: * * S E C R E T * * | ||
CLJ Service->>Third-Party-REST-API: Request Secret with Public Key | ||
Third-Party-REST-API->>Third-Party-REST-API: Encrypt data with Public Key | ||
Third-Party-REST-API->>CLJ Service: ENCRYPTED-RESPONSE | ||
CLJ Service->>CLJS SPA: ENCRYPTED-RESPONSE | ||
CLJS SPA->>ok2cry: decrpytPayload | ||
ok2cry->>ok2cry: Destroy Key Pair | ||
ok2cry->>CLJS SPA: plain text payload | ||
CLJS SPA->>User: Show secret | ||
``` | ||
|
||
### Practical problems | ||
|
||
Agreeing a key scheme and security process between the two companies is difficult. | ||
|
||
The Third Party service usually has several clients and would prefer a standard solution. | ||
|
||
## Practical solution | ||
|
||
|
||
|
||
|
||
|