diff --git a/diagrams/example-dso-only-implementation-using-oauth-components.drawio b/diagrams/example-dso-only-implementation-using-oauth-components.drawio new file mode 100644 index 0000000..f4aeae6 --- /dev/null +++ b/diagrams/example-dso-only-implementation-using-oauth-components.drawio @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/diagrams/example-dso-only-implementation-using-oauth-sequence.drawio b/diagrams/example-dso-only-implementation-using-oauth-sequence.drawio new file mode 100644 index 0000000..4d49497 --- /dev/null +++ b/diagrams/example-dso-only-implementation-using-oauth-sequence.drawio @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/diagrams/example-full-implementation-using-oauth-components.drawio b/diagrams/example-full-implementation-using-oauth-components.drawio new file mode 100644 index 0000000..4a8223b --- /dev/null +++ b/diagrams/example-full-implementation-using-oauth-components.drawio @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/diagrams/example-full-implementation-using-oauth-sequence.drawio b/diagrams/example-full-implementation-using-oauth-sequence.drawio new file mode 100644 index 0000000..e46261b --- /dev/null +++ b/diagrams/example-full-implementation-using-oauth-sequence.drawio @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/appendix/optional-security-measures.md b/docs/appendix/optional-security-measures.md new file mode 100644 index 0000000..b708e3f --- /dev/null +++ b/docs/appendix/optional-security-measures.md @@ -0,0 +1,43 @@ + + +# Optional security measures + +When implementing the specification, it is recommended to add additional security measures on top of the described in [message signing mechanism](message-transport-mechanism.md). +This has the main benefit of adding sender verification before actually processing a message, offering better protection against certain attacks, such as DOS style attacks. + +## OAuth 2.0 + +OAuth 2.0 is seen as the default additional measure that should be used when implementing the specification. +On top of being the industry standard, it provides a relatively simple, low-maintenance and flexible way to add endpoint security. +OAuth 2.0 also suits the flexibility that Shapeshifter aims to support. + +It can be added as an optional component to the system, with each participant deciding for themselves whether it is worthwhile to implement. +You can imagine a system where the DSO has configured an OAuth provider, while a smaller AGR might rely solely on the message signing mechanism, since the DSO is much more likely to be targeted by malicious actors. +This distinction can then be integrated into the Discovery phase, where the DSO can advertise that it requires OAuth 2.0 for communication. + +It is recommended to use the `client_credentials` grant type, as it is the most suitable for machine-to-machine communication. +Each party would get an authorized client in the OAuth provider of the parties they are communicating with. + +More information about OAuth 2.0 can be found here +* OAuth 2.0 specification: https://oauth.net/2/ +* OAuth 2.0 providers: https://oauth.net/code/ + +### Example system - both parties using OAuth 2.0 + +A system using ShapeShifter and OAuth 2.0 could look like this. + + +With the following sequence when the DSO sends a FlexRequest to the AGR. + + +### Example system - Only DSO using OAuth 2.0 + +A system where only the DSO uses OAuth 2.0 could look like this. + + +With the following sequence when the DSO sends a FlexRequest to the AGR. + diff --git a/docs/assets/images/example-dso-only-implementation-using-oauth-components.svg b/docs/assets/images/example-dso-only-implementation-using-oauth-components.svg new file mode 100644 index 0000000..21eb287 --- /dev/null +++ b/docs/assets/images/example-dso-only-implementation-using-oauth-components.svg @@ -0,0 +1,4 @@ + + + +DSO Shapeshifter implementationAGR Shapeshifter implementationDSO OAuth providerVerify provided tokenRequest tokenFlexMessage communicationwithout OAuthFlexMessage communicationincluding token in header \ No newline at end of file diff --git a/docs/assets/images/example-dso-only-implementation-using-oauth-sequence.svg b/docs/assets/images/example-dso-only-implementation-using-oauth-sequence.svg new file mode 100644 index 0000000..062ae3d --- /dev/null +++ b/docs/assets/images/example-dso-only-implementation-using-oauth-sequence.svg @@ -0,0 +1,4 @@ + + + +DSO Shapeshifter implementationAGR Shapeshifter implementationVerify messageDSO OAuth ProviderRequest tokenReturn tokenSend FlexRequestReturn 200 OKSend FlexRequestResponse,including token in headerVerify tokenReturn verification resultReturn 200 OK \ No newline at end of file diff --git a/docs/assets/images/example-implementation-using-oauth-components.svg b/docs/assets/images/example-implementation-using-oauth-components.svg new file mode 100644 index 0000000..274ca51 --- /dev/null +++ b/docs/assets/images/example-implementation-using-oauth-components.svg @@ -0,0 +1,4 @@ + + + +DSO Shapeshifter implementationAGR Shapeshifter implementationDSO OAuth providerAGR OAuth providerVerify provided tokenVerify provided tokenRequest tokenFlexMessage communicationincluding tokens in header \ No newline at end of file diff --git a/docs/assets/images/example-implementation-using-oauth-sequence.svg b/docs/assets/images/example-implementation-using-oauth-sequence.svg new file mode 100644 index 0000000..6f709c2 --- /dev/null +++ b/docs/assets/images/example-implementation-using-oauth-sequence.svg @@ -0,0 +1,4 @@ + + + +DSO Shapeshifter implementationAGR Shapeshifter implementationVerify messageDSO OAuth ProviderAGR OAuth ProviderRequest tokenReturn tokenSend FlexRequest,including token in headerVerify tokenReturn verification resultReturn 200 OKRequest tokenReturn tokenSend FlexRequestResponse,including token in headerVerify token \ No newline at end of file