├── .github
├── CODEOWNERS
└── workflows
│ ├── config
│ └── yamllint.yaml
│ ├── scopes-doc.yaml
│ ├── scripts
│ └── scopes-doc.py
│ └── yaml-lint.yml
├── .gitignore
├── README.md
├── authorization.yaml
├── docs
├── .DS_Store
├── scopes.md
└── silent-sign-in
│ ├── README.md
│ ├── seq_ssi.png
│ └── ssi-openapi.yaml
└── europace_security.yaml
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @gruenewa @schmidthappens
2 |
3 | europace_security.yaml @schmidthappens
4 |
--------------------------------------------------------------------------------
/.github/workflows/config/yamllint.yaml:
--------------------------------------------------------------------------------
1 | # This is a configuration file for yamllint!
2 | # It extends the default conf by adjusting some options.
3 |
4 | extends: default
5 |
6 | rules:
7 | trailing-spaces: disable
8 | line-length: disable
9 |
--------------------------------------------------------------------------------
/.github/workflows/scopes-doc.yaml:
--------------------------------------------------------------------------------
1 | name: "Create Scopes Doc"
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 |
8 | jobs:
9 | create-docs:
10 | runs-on: ubuntu-latest
11 |
12 | steps:
13 | - uses: actions/checkout@v2
14 | - name: Fetch unshallow
15 | run: git fetch --prune --tags --unshallow
16 |
17 | - name: Set up Python
18 | uses: actions/setup-python@v2
19 |
20 | - name: Install dependencies
21 | run: |
22 | python -m pip install --upgrade pip
23 | pip install pyyaml
24 |
25 | - name: Transform YAML to Doc
26 | run: |
27 | python .github/workflows/scripts/scopes-doc.py -i europace_security.yaml > docs/scopes.md
28 |
29 | - name: Commit files
30 | run: |
31 | echo ${{ github.ref }}
32 | git add .
33 | git config --local user.email "action@github.com"
34 | git config --local user.name "GitHub Action"
35 | git commit -m "Updated Scopes Doc" -a | exit 0
36 |
37 | - name: Push changes
38 | if: github.ref == 'refs/heads/master'
39 | uses: ad-m/github-push-action@master
40 | with:
41 | github_token: ${{ secrets.GITHUB_TOKEN }}
42 | force: true
43 |
--------------------------------------------------------------------------------
/.github/workflows/scripts/scopes-doc.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import sys
4 | import yaml
5 | from optparse import OptionParser
6 |
7 | def transformScopesToMarkDown(input):
8 | scopes = input["flows"]["clientCredentials"]["scopes"].copy()
9 |
10 | intro="""# Scopes für OAuth Clients bei Europace
11 |
12 | Mit Hilfe der Scopes kannst du genau angeben, welche Art von Zugriff du benötigst. Scopes beschränken den Zugriff mittels OAuth-Token. Sie gewähren keine zusätzlichen Berechtigungen über die Rechte des Nutzers hinaus.
13 |
14 | ## Verfügbare Scopes
15 |
16 | Die nachfolgende Tabelle stellt eine Liste, der aktuell verfügbaren Scopes dar.
17 |
18 | | Scope | Name | Beschreibung |
19 | |-------|------|---------------| """
20 |
21 | print(intro)
22 | for scope in scopes:
23 | sep = scopes[scope].find('\n')
24 | print('| `', scope.strip(), '` | ', scopes[scope][:sep].replace('##', '').strip(), ' | ', scopes[scope][sep:].replace('##', '').replace('\n', ' ').replace('\r', '').rstrip(), ' |')
25 |
26 | def printScopes(inputfile):
27 | with open(inputfile) as stream:
28 | europace_security = ''
29 | try:
30 | europace_security = yaml.safe_load(stream)
31 | except yaml.YAMLError as exc:
32 | print(exc)
33 |
34 | transformScopesToMarkDown(europace_security)
35 |
36 | def main():
37 | parser = OptionParser()
38 | parser.add_option("-i", "--input", dest="input", metavar="FILE")
39 |
40 | (options, args) = parser.parse_args()
41 | inputfile = options.input
42 |
43 | printScopes(inputfile)
44 |
45 | if __name__ == "__main__":
46 | main()
47 |
--------------------------------------------------------------------------------
/.github/workflows/yaml-lint.yml:
--------------------------------------------------------------------------------
1 | name: "Check yaml with Linter"
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | pull_request:
8 | branches:
9 | - master
10 |
11 | jobs:
12 | build:
13 |
14 | runs-on: ubuntu-latest
15 |
16 | steps:
17 | - uses: actions/checkout@v2
18 | - name: Set up Python
19 | uses: actions/setup-python@v2
20 |
21 | - name: Install dependencies
22 | run: |
23 | python -m pip install --upgrade pip
24 | pip install yamllint
25 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26 |
27 | - name: Check yaml files
28 | run: |
29 | yamllint -c .github/workflows/config/yamllint.yaml --no-warnings .
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # IDEA files
2 | .idea/
3 | *.iml
4 |
5 | # Build files
6 | build/
7 | target/
8 | classes/
9 | debug/
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Authorization API
2 |
3 | The Authorization API provides authentication to Europace for APIs. It is a mandatory requirement for using Europace APIs.
4 |
5 |
6 | 
7 | 
8 | 
9 | 
10 |
11 | [](https://github.com/europace/authorization-api)
12 |
13 | [](https://github.com/europace/authorization-api/releases)
14 | [](https://martinfowler.com/bliki/TolerantReader.html)
15 |
16 | ## Documentation
17 | [](https://europace.github.io/authorization-api/oas-doc.html)
18 | [](https://github.com/europace/authorization-api/blob/master/authorization.yaml)
19 |
20 | **related articles**
21 | * [Migrationsguide](https://docs.api.europace.de/common/authentifizierung/oauth-migrationsguide_en).
22 | * HowTo implement [auth-code-flow](https://docs.api.europace.de/common/authentifizierung/oauth-code-flow_en/)
23 |
24 | ## Usecases
25 | - login user to use europace-apis with his identity
26 |
27 | ## Quickstart
28 | To test our APIs and your use case as quickly as possible, we've put together a [Postman Collection](https://github.com/europace/api-schnellstart) for you.
29 |
30 | ## How to use OAuth2?
31 |
32 | All Europace APIs are access restricted, i.e. in order to use them a login (authentication) to Europace has to be done first.
33 |
34 | Follow these steps:
35 | - you have to register your client once in Europace, whereupon you will receive the `Client_ID` and the `Client-Secret` for the client.
36 | - To log in to Europace, call `https://api.europace.de/auth/token` with the `Client_ID` and the `Client_Secret` as Basic-Auth to get an `access_token`. Most HTTP clients already support OAuth2 and can be configured with these parameters.
37 | - With the `access_token` as a bearer token you can make requests to the Europace APIs.
38 | Request header variable: `Authorization: Bearer [access_token]`
39 |
40 | ## How to register your client?
41 |
42 | apply client-registration
43 |
44 |
45 | Please contact helpdesk@europace2.de with the following data:
46 | - EP2 PartnerId
47 | - Client name
48 | - Client Description:
49 | - Contact email address for operational queries
50 | - Short description of the use case (goal)
51 | - required scopes
52 |
53 | After a short check with the owner (Europace partner) we will register your client immediately and provide you with the client ID and client secret in your personal link list in Europace.
54 |
55 | 
56 |
57 | Please note that by using the APIs, you automatically agree to the [Europace API Terms of Use](https://docs.api.europace.de/nutzungsbedingungen/).
58 |
59 | ## How to get an access-token?
60 | To log in to Europace, call `https://api.europace.de/auth/token` with the `Client_ID` and the `Client_Secret` as Basic-Auth to get an Access_Token.
61 |
62 | Request:
63 | ```cURL
64 | curl --location --request POST 'https://api.europace.de/auth/token' \
65 | --user '[Client_ID]:[Client_Secret]' \
66 | --header 'Content-Type: application/x-www-form-urlencoded' \
67 | --data-urlencode 'grant_type=client_credentials'
68 | ```
69 |
70 | Response:
71 | ```json
72 | { "access_token": [Access_Token],
73 | "scope": [verfügbare Scopes],
74 | "token_type": "Bearer",
75 | "expires_in": 3600 }
76 | ```
77 |
78 | In this case, an access token is created in the name and on behalf of the partner to which the client is registered. Further use cases are discussed in "Old world - new world".
79 |
80 | In addition to the grant type, the following request parameters are supported:
81 |
82 | - ##### Grant-Type (`grant_type`)
83 | [OAuth2.0 Grant-Type][RFC6749#4], must be `client_credentials` for client credentials flow.
84 | - ##### Scopes (`scope`).
85 | "` `"-separated list of scopes. If a subject is specified, `impersonate` must be included as a scope.
86 | Requested scopes are restricted according to the actor's permissions and the client's approval by the actor. It is possible to request restricted access by specifying specific scopes. A scope represents an authorization to perform actions on the platform. If no scopes are requested, the scope results from the scopes stored during client registration. The currently available scopes are maintained in an [Overview](https://github.com/europace/authorization-api/blob/master/docs/scopes.md).
87 | - ##### Actor (`actor`)
88 | Partner id of the partner on whose behalf the client is acting, there must be a
89 | client-approval of the actor for the client. Currently the client-approval is granted automatically during registration for the actor and all subjects in the access area of the client.
90 | - ##### Subject (`subject`)
91 | Partner id of the partner on whose behalf the client acts. The subject must be subordinate to the actor.
92 |
93 | ## How to call an API with access-token?
94 | With the Access_Token as a Bearer token you can make requests to the Europace APIs.
95 | Request header variable: `Authorization: Bearer [access_token]`
96 |
97 | Using the example of the process API in curl:
98 | ```cURL
99 | curl --location --request GET 'https://api.europace2.de/v2/vorgaenge' \
100 | --header 'Content-Type: application/json' \
101 | --header 'Authorization: Bearer [access_token]'
102 | ```
103 |
104 | ## How to authenticate different users with one client? (Impersonation)
105 |
106 | The imperseded OAuth2 method is used when the API needs the specific user and you don't want to register a client for each user. It is enough to have one client for the organization that acts as a general key and can be used to log in users that the organization has access to.
107 |
108 | ```cURL
109 | curl --location --request POST 'https://api.europace.de/auth/token' \
110 | --user '[ClientID]:[ClientSecret]' \
111 | --header 'Content-Type: application/x-www-form-urlencoded' \
112 | --data-urlencode 'grant_type=client_credentials' \
113 | --data-urlencode 'scope=impersonieren baufinanzierung:echtgeschaeft baufinanzierung:vorgang:lesen baufinanzierung:ereignis:lesen baufinanzierung:antrag:lesen' \
114 | --data-urlencode 'subject=[to be login PartnerID]' \
115 | --data-urlencode 'actor=[registered PartnerID]'
116 | ```
117 |
118 | Parameters | Description |
119 | --------- | :--- |
120 | Subject | the PartnerID of the user to be registered
121 | Actor | the partnerID of the registered client
**Note**: The Actor partnerid must be placed above the Subject partnerid in the partner management structure, otherwise the necessary access rights are missing. There can be any number of scopes between the partnerids.
122 | Scope | required scopes of the token
**Note**: The scope `impersonate` must always be included. All specified scopes must be enabled at the client.
123 |
124 | ## Terms of use
125 | The APIs are made available under the following [Terms of Use](https://docs.api.europace.de/nutzungsbedingungen/).
126 |
127 | ## Support
128 | If you have any questions or problems, you can contact devsupport@europace2.de.
129 |
130 | [JWT]: https://tools.ietf.org/html/rfc7519
131 | [ASCII]: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-006.pdf
132 | [UTF-8]: https://tools.ietf.org/html/rfc3629
133 | [URI]: https://tools.ietf.org/html/rfc3986
134 | [Unix-Timestamp]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16
135 | [RFC6749#4]: https://tools.ietf.org/html/rfc6749#section-4
136 | [RFC6749#4.4]: https://tools.ietf.org/html/rfc6749#section-4.4
137 | [HTTP Basic Auth]: https://tools.ietf.org/html/rfc7617#section-2
138 |
--------------------------------------------------------------------------------
/authorization.yaml:
--------------------------------------------------------------------------------
1 | openapi: 3.0.0
2 | info:
3 | title: Europace Authorization API
4 | description: The authorization-api can be requested to get an access-token from registered clients with client-credential-flow to use the Europace APIs.
5 | version: '1.0'
6 | termsOfService: 'https://docs.api.europace.de/nutzungsbedingungen/'
7 | contact:
8 | name: Europace AG
9 | url: 'https://docs.api.europace.de/'
10 | email: devsupport@europace2.de
11 | servers:
12 | - url: 'https://api.europace.de/auth'
13 | description: production server
14 | paths:
15 | /token:
16 | post:
17 | summary: login
18 | description: Client-id and client-secret must be passed via HTTP Basic Auth.
19 | parameters:
20 | - schema:
21 | type: string
22 | default: mytraceid123
23 | in: header
24 | name: X-TraceId
25 | description: your string for debugging
26 | - schema:
27 | type: string
28 | default: application/x-www-form-urlencoded
29 | in: header
30 | name: Content-Type
31 | description: ''
32 | required: true
33 | security:
34 | - basicAuth: []
35 | requestBody:
36 | content:
37 | application/x-www-form-urlencoded:
38 | schema:
39 | $ref: '#/components/schemas/loginRequest'
40 | examples:
41 | client-credential-flow:
42 | value:
43 | grant_type: client_credentials
44 | client-credential-flow impersionation:
45 | value:
46 | grant_type: client_credentials
47 | scope: no-access impersonieren
48 | subject: ABC12
49 | actor: XYZ54
50 | auth-code-flow:
51 | value:
52 | grant_type: code
53 | code: zJ0UhYgeOPInCons
54 | redirect: 'https://myFinanceApp.com/oidc'
55 | description: ''
56 | tags:
57 | - Auth
58 | responses:
59 | '200':
60 | description: OK
61 | content:
62 | application/json:
63 | schema:
64 | $ref: '#/components/schemas/loginResponse'
65 | '400':
66 | description: Bad Request. e.g. not existing scopes requested
67 | content:
68 | application/json:
69 | schema:
70 | $ref: '#/components/schemas/error'
71 | examples:
72 | kein grant_type angegeben:
73 | value:
74 | error_description: 'Invalid request: Missing "grant_type" parameter'
75 | error: invalid_request
76 | Actor nicht gefunden:
77 | value:
78 | error_description: 'Unauthorized client: Actor not found'
79 | error: unauthorized_client
80 | falschen Scope angefordert:
81 | value:
82 | error_description: 'Invalid, unknown or malformed scope'
83 | error: invalid_scope
84 | '401':
85 | description: Unauthorized. Client credentials authorization error
86 | content:
87 | application/json:
88 | schema:
89 | $ref: '#/components/schemas/error'
90 | examples:
91 | Autorisierungsfehler:
92 | value:
93 | error_description: 'Client authentication failed: Client id unknown / deactivated or client secret invalid / expired.'
94 | error: invalid_client
95 | '429':
96 | description: Too Many Requests. Rate limit exceeded.
97 | '500':
98 | description: Internal Server Error. Ooops.
99 | '503':
100 | description: Service Unavailable
101 | operationId: createToken
102 | parameters: []
103 | components:
104 | securitySchemes:
105 | basicAuth:
106 | type: http
107 | scheme: basic
108 | schemas:
109 | loginResponse:
110 | title: loginResponse
111 | type: object
112 | description: |-
113 | Response of a succesful login.
114 | When authentication-code-flow: the additional id_token with user-information will be delivered
115 | x-examples:
116 | client_credential_flow:
117 | access_token: I6MTU3...wet46
118 | token_type: Bearer
119 | expires_in: 3600
120 | scope: no-access
121 | client_credential_flow_impersonation:
122 | access_token: I6MTU3...wet46
123 | token_type: Bearer
124 | expires_in: 3600
125 | scope: no-access impersonate
126 | authentication_code_flow:
127 | access_token: I6MTU3...wet46
128 | token_type: Bearer
129 | id_token: I6MTU3...dry46
130 | expires_in: 3600
131 | scope: no-access openid profile
132 | properties:
133 | access_token:
134 | type: string
135 | description: Access token for use as a bearer token in the Europace APIs.
136 | token_type:
137 | type: string
138 | default: BEARER
139 | description: Type of Token (BEARER)
140 | expires_in:
141 | type: integer
142 | description: Validity period in seconds
143 | scope:
144 | type: string
145 | description: 'Valid scopes of the access token to know, what is possible for your app.'
146 | id_token:
147 | type: string
148 | description: id_token contains authenticated sub and if scope=profile the user_profile information
149 | required:
150 | - access_token
151 | - token_type
152 | - expires_in
153 | - scope
154 | loginRequest:
155 | title: loginRequest
156 | type: object
157 | description: |-
158 | Parameters for the login.
159 |
160 | When client-credential-flow: only `grant_type=client_credential` required.
161 |
162 | When authentication-code-flow: `grant_type=code`, `code` and `redirect` are required.
163 |
164 | When client-credential-flow with impersonation: `subject`, `actor` and `impersonate` as `scope` as well as all other required scopes must be specified.
165 | x-examples:
166 | client_credential_flow:
167 | grant_type: client_credentials
168 | authentication_code_flow:
169 | grant_type: code
170 | code: zJ0UhYgeOPInCons
171 | redirect: 'https://myFinanceApp.com/oidc'
172 | client_credential_flow_impersonation:
173 | grant_type: client_credentials
174 | scope: no-access impersonieren
175 | subject: ABC12
176 | actor: XYZ54
177 | properties:
178 | grant_type:
179 | type: string
180 | default: client_credentials
181 | description: Must be `client_credentials` for the client-credentials-flow and `code` for the authenticaton-code-flow.
182 | enum:
183 | - client_credentials
184 | - code
185 | scope:
186 | type: string
187 | default: no-access impersonieren
188 | description: 'space-separated list of scopes. Only used if the grant_type is client_credentials. If a subject is specified, imperson ate must be included as a scope. Requested scopes are restricted according to the actor''s permissions and the client''s approval by the actor. It is possible to request restricted access by specifying specific scopes. A scope represents an authorization to perform actions on the platform. If no scopes are requested, the scope is derived from the scopes stored during client registration. The currently available scopes are maintained in an overview.'
189 | subject:
190 | type: string
191 | description: Partner id of the partner on whose behalf the client acts. The subject must be subordinate to the actor.
192 | minLength: 5
193 | maxLength: 5
194 | example: ABC12
195 | actor:
196 | type: string
197 | description: 'Partner id of the partner on whose behalf the client is acting, there must be a client approval of the actor for the client.'
198 | minLength: 5
199 | maxLength: 5
200 | example: XYZ54
201 | code:
202 | type: string
203 | example: zJ0UhYgeOPInCons
204 | minLength: 16
205 | maxLength: 16
206 | description: code transfered to your registered callback uri
207 | redirect_uri:
208 | type: string
209 | format: uri
210 | description: your registered and requested callback uri what is redirected after user authentication process
211 | required:
212 | - grant_type
213 | error:
214 | title: error
215 | type: object
216 | properties:
217 | error_description:
218 | type: string
219 | error:
220 | type: string
221 | required:
222 | - error_description
223 | - error
224 | description: Content error message in addition to HTTP error code.
225 | tags:
226 | - name: Auth
227 |
--------------------------------------------------------------------------------
/docs/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/europace/authorization-api/2166470478d32c2a16387035e3d01de4baf3bbfc/docs/.DS_Store
--------------------------------------------------------------------------------
/docs/scopes.md:
--------------------------------------------------------------------------------
1 | # Scopes für OAuth Clients bei Europace
2 |
3 | Mit Hilfe der Scopes kannst du genau angeben, welche Art von Zugriff du benötigst. Scopes beschränken den Zugriff mittels OAuth-Token. Sie gewähren keine zusätzlichen Berechtigungen über die Rechte des Nutzers hinaus.
4 |
5 | ## Verfügbare Scopes
6 |
7 | Die nachfolgende Tabelle stellt eine Liste, der aktuell verfügbaren Scopes dar.
8 |
9 | | Scope | Name | Beschreibung |
10 | |-------|------|---------------|
11 | | ` partner:plakette:anlegen ` | Partner anlegen | Neue Organisationen oder Personen können erstellt werden. |
12 | | ` partner:plakette:lesen ` | Partner lesen | |
13 | | ` partner:plakette:schreiben ` | Partner verändern | |
14 | | ` partner:beziehungen:lesen ` | Partner-Beziehungen lesen | Zugriffs- und Einstellungsrechte können abgerufen werden. |
15 | | ` partner:beziehungen:schreiben ` | Partner-Beziehungen schreiben | Zugriffsrechte können vergeben werden. |
16 | | ` partner:rechte:lesen ` | Partner-Rechte lesen | |
17 | | ` partner:rechte:schreiben ` | Partner-Rechte verändern | |
18 | | ` partner:login:silent-sign-in ` | Silent-Sign-In erlaubt | Ermöglicht das öffnen von Europace im Browser ohne Passwortabfrage. |
19 | | ` report:rohdaten:lesen ` | Vertriebs-Rohdaten-Report abrufen | |
20 | | ` report:produktanbieter:lesen ` | Produktanbieter-Report abrufen | |
21 | | ` baufinanzierung:echtgeschaeft ` | BaufiSmart-Echtgeschäft bearbeiten | |
22 | | ` baufinanzierung:vorgang:lesen ` | BaufiSmart-Vorgänge lesen | |
23 | | ` baufinanzierung:vorgang:schreiben ` | BaufiSmart-Vorgänge anlegen | |
24 | | ` baufinanzierung:angebot:ermitteln ` | BaufiSmart-Angebote ermitteln | |
25 | | ` baufinanzierung:angebot:loeschen ` | gespeicherte BaufiSmart-Angebote löschen | |
26 | | ` baufinanzierung:ereignis:lesen ` | BaufiSmart-Ereignisse lesen | |
27 | | ` baufinanzierung:antrag:lesen ` | BaufiSmart-Anträge lesen | |
28 | | ` baufinanzierung:antrag:schreiben ` | BaufiSmart-Anträge verändern | Der Antragsstatus und der Sachbearbeiter können verändert sowie die Produktanbieter-Renferenz ergänzt werden. |
29 | | ` baufinanzierung:produktkonfiguration:lesen ` | Produktkonfiguration lesen | für Product-Cockpit |
30 | | ` baufinanzierung:produktkonfiguration:schreiben ` | Produktkonfiguration verändern | für Product-Cockpit |
31 | | ` baufinanzierung:produktkonfiguration:freigeben ` | Produktkonfiguration freigeben | für Product-Cockpit |
32 | | ` baufinanzierung:produkt:lesen ` | Produkt lesen | für Product-Cockpit |
33 | | ` baufinanzierung:produkt:schreiben ` | Produkt verändern | für Product-Cockpit |
34 | | ` baufinanzierung:produktanbieter:lesen ` | Produktanbieter lesen | für Product-Cockpit |
35 | | ` baufinanzierung:produktanbieter:schreiben ` | Produktanbieter verändern | für Product-Cockpit |
36 | | ` privatkredit:angebot:ermitteln ` | KreditSmart-Angebote ermitteln | Ratenkredit-Angebote und -Schaufensterkonditionen können ermittelt werden. |
37 | | ` privatkredit:antrag:schreiben ` | KreditSmart-Anträge anlegen/verändern | Anträge anlegen (annehmen) oder verändern (z.B. Antragsstatus). |
38 | | ` privatkredit:vorgang:lesen ` | KreditSmart-Vorgänge lesen | |
39 | | ` privatkredit:vorgang:schreiben ` | KreditSmart-Vorgänge anlegen/verändern | Vorgänge anlegen oder verändern. |
40 | | ` dokumente:dokument:lesen ` | Dokumente herunterladen | Dokumente können aus einem Vorgang oder Antrag gelesen (heruntergeladen) werden |
41 | | ` dokumente:dokument:schreiben ` | Dokumente hinzufügen | Dokumente können zu einem Vorgang oder Antrag hinzugefügt (hochgeladen) werden |
42 | | ` unterlagen:dokument:lesen ` | Unterlagendokumente herunterladen | Hochgeladene Dokumente eines Vorgangs können heruntergeladen werden. |
43 | | ` unterlagen:dokument:schreiben ` | Unterlagendokumente hinzufügen und kategorisieren | Dokumente zu einem Vorgang können hochladen, umbenannt, gelöscht und die Kategorisierung gestartet werden, damit die Dokumente in der Unterlagenakte zu Verfügung stehen. |
44 | | ` unterlagen:unterlage:lesen ` | Unterlagen lesen | Kategorisierte Dokumente (Unterlagen) können abgerufen werden. |
45 | | ` unterlagen:unterlage:schreiben ` | Unterlagen neu zuordnen | Die Kategorie und der Bezug der Unterlagen können geändert werden. |
46 | | ` unterlagen:unterlage:freigeben ` | Unterlagen freigeben | Unterlagen für einen Antrag können freigeben werden. |
47 | | ` unterlagen:freigabe:lesen ` | Freigegebene Unterlagen lesen | Freigegebene Unterlagen zu einem Antrag können abgerufen werden. |
48 | | ` unterlagen:freigabe:schreiben ` | Freigegebene Unterlagen aktualisieren | Der Status einer freigegeben Unterlagen kann verändert werden, um aus Produktanbietersicht den Empfang der Unterlagen zu bestätigen. |
49 | | ` impersonieren ` | Impersonieren | Aktionen können im Namen eines untergeordneten Partners ausgeführt werden. |
50 | | ` openid ` | Benutzer-Identität überprüfen | Die Anmeldung bei Europace kann angefordert werden, um die Identität des Benutzers zu überprüfen. |
51 | | ` profile ` | Benutzerprofil lesen | Profildaten (Vor- und Nachname, Benutzername, E-Mail und Avatar-Bild) des angemeldeten Benutzers können abgerufen werden. |
52 |
--------------------------------------------------------------------------------
/docs/silent-sign-in/README.md:
--------------------------------------------------------------------------------
1 | # Silent-Sign-In API
2 |
3 | Europace's Silent Sign-In API allows users to sign in through an OAuth client and invoke the Europace user interface in the browser.
4 |
5 | ----
6 | 
7 | 
8 | 
9 | 
10 |
11 | [](https://docs.api.europace.de/baufinanzierung/authentifizierung/)
12 | 
13 |
14 | ## Usecases
15 |
16 | - Log in a user and display Europace seamlessly in an iFrame or new browser tab.
17 |
18 | ## Dokumentation
19 | [](https://europace.github.io/authorization-api/ssi.html)
20 | [](https://github.com/europace/authorization-api/blob/master/docs/silent-sign-in/ssi-openapi.yaml)
21 |
22 | Feedback and questions are welcome as [GitHub Issue](https://github.com/europace/authorization-api/issues/new).
23 |
24 |
25 | ## Steps of the Silent Sign-In
26 | 
27 |
28 | ## Example: Log on user and open process
29 |
30 | ### Step 1 - Login user
31 | The step is optional if a user access token already exists.
32 |
33 | To use the API, the OAuth2 client requires the following scopes:
34 | | Scope | API-Usecase |
35 | | -------------------------------------- | ---------------------------------------------------------------- |
36 | | ` partner:login:silent-sign-in ` | Silent sign-in allowed |
37 | | ` impersonieren ` | Log in other users as subject
38 |
39 | > The access token must be issued in the name of the user.
40 | Impersonation can be applied to create this as a client. See: [Authorization API Impersonate](https://docs.api.europace.de/common/authentifizierung/authorization-api/#wie-authentifiziere-ich-verschiedene-benutzer-mit-einem-client-impersionieren)
41 |
42 | ### Step 2 - Generate one-time password
43 | For security reasons, a one-time password is used to access Europace via the browser.
44 |
45 | Example-request:
46 | ``` http
47 | POST /authorize/silent-sign-in?subject=[user-partner-id] HTTP/1.1
48 | Host: www.europace2.de
49 | Authorization: Bearer [user-access-token]
50 | ```
51 |
52 | Example-resonse:
53 | ``` json
54 | {
55 | "otp": "05448389A4014F49AFC896EB15B60A07AE8B"
56 | }
57 | ```
58 |
59 | ### Step 3 - Open Europace in the browser
60 | Europace can now be opened with the OTP. To display the process AB45C2 directly, the redirect_uri will be passed with `/vorgang/oeffne/[vorgangsnummer]`.
61 |
62 | Example-request:
63 | ``` http
64 | GET /authorize/silent-sign-in?subject=[user-partner-id]&redirect_uri=/vorgang/oeffne/AB45C2&otp=[otp] HTTP/1.1
65 | Host: www.europace2.de
66 | ```
67 |
68 | Example-response: \
69 | Redirect with EP session to `https://www.europace2.de/[redirect_uri]`
70 |
71 | List of Redirect_uris:
72 | * `/uebersicht` (default)
73 | * `/vorgangsmanagement`
74 | * `/vorgang/oeffne/[vorgangsnummer]`
75 | * `/antragsuebersicht` (for product providers only)
76 | * `/partnermanagement`
77 |
--------------------------------------------------------------------------------
/docs/silent-sign-in/seq_ssi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/europace/authorization-api/2166470478d32c2a16387035e3d01de4baf3bbfc/docs/silent-sign-in/seq_ssi.png
--------------------------------------------------------------------------------
/docs/silent-sign-in/ssi-openapi.yaml:
--------------------------------------------------------------------------------
1 | openapi: 3.0.3
2 | tags:
3 | - name: Silent-Sign-In
4 | info:
5 | title: ssi-api
6 | version: v1.0
7 | description: Europace's Silent Sign-In API allows users to sign in through an OAuth client and invoke the Europace user interface in the browser.
8 | contact:
9 | name: Europace AG
10 | url: 'http://docs.api.europace.de'
11 | email: info@europace.de
12 | termsOfService: 'https://docs.api.europace.de/nutzungsbedingungen/'
13 | servers:
14 | - url: 'https://www.europace2.de/authorize'
15 | description: production server
16 | externalDocs:
17 | url: 'https://docs.api.europace.de/common/authentifizierung/ssi-api/'
18 | paths:
19 | /silent-sign-in:
20 | parameters: []
21 | post:
22 | summary: create Silent-Sign-In OTP
23 | operationId: create-ssi-otp
24 | responses:
25 | '200':
26 | description: Created - otp created
27 | content:
28 | application/json:
29 | schema:
30 | $ref: '#/components/schemas/otp'
31 | examples:
32 | example-1:
33 | value:
34 | otp: EGSY53CGGSXZBWGMSPBZD2ILAKCF6J53
35 | '401':
36 | description: Unauthorized - access-token has expired
37 | content:
38 | application/json:
39 | schema:
40 | $ref: '#/components/schemas/Error'
41 | '403':
42 | description: Forbidden - Scopes silent-sign-on is not present
43 | content:
44 | application/json:
45 | schema:
46 | $ref: '#/components/schemas/Error'
47 | description: |-
48 | Generates on-time-password (otp) from the access-token for the browser redirect.
49 |
50 | If the OAuth client is registered on an organization, then impersonation must be done for the user with the client. The subject of the access-token is used as the user of the silent sign-in. As security, the subject is also expected and checked as a parameter.
51 | security:
52 | - europace_oauth2: []
53 | tags:
54 | - Silent-Sign-In
55 | parameters:
56 | - schema:
57 | type: string
58 | in: query
59 | name: subject
60 | description: subject to sign-in
61 | required: true
62 | get:
63 | summary: open Silent-Sign-In
64 | operationId: open-ssi
65 | responses:
66 | '303':
67 | description: See Other
68 | headers:
69 | Location:
70 | schema:
71 | type: string
72 | format: uri-reference
73 | description: redirect_uri with Session
74 | '403':
75 | description: Forbidden - otp invalid
76 | content:
77 | application/json:
78 | schema:
79 | $ref: '#/components/schemas/Error'
80 | parameters:
81 | - schema:
82 | type: string
83 | example: /uebersicht
84 | format: uri-reference
85 | in: query
86 | name: redirect_uri
87 | description: relative uri from Europace
88 | required: true
89 | - schema:
90 | type: string
91 | minLength: 32
92 | maxLength: 32
93 | in: query
94 | name: otp
95 | description: one-time-password
96 | required: true
97 | - schema:
98 | type: string
99 | in: query
100 | name: subject
101 | description: subject to sign-in
102 | required: true
103 | description: Browser endpoint that checks the one-time password and redirects to the requested endpoint with a Europace session.
104 | tags:
105 | - Silent-Sign-In
106 | components:
107 | securitySchemes:
108 | europace_oauth2:
109 | type: http
110 | scheme: bearer
111 | description: 'partner:login:silent-sign-in'
112 | schemas:
113 | otp:
114 | title: one-time-password
115 | type: object
116 | description: One-Time-Password für Silent-Sign-In
117 | properties:
118 | otp:
119 | type: string
120 | minLength: 32
121 | maxLength: 32
122 | description: one-time-password
123 | x-examples: {}
124 | Error:
125 | title: Error
126 | type: object
127 | properties:
128 | message:
129 | type: string
130 | traceId:
131 | type: string
132 | required:
133 | - message
134 | security:
135 | - europace_oauth2: []
136 |
--------------------------------------------------------------------------------
/europace_security.yaml:
--------------------------------------------------------------------------------
1 | # Diese Datei enthält die Europace2 Oauth2 Konfiguration sowie eine Liste aller Scope-Definitionen.
2 | #
3 | # Das Format ist
4 | # domäne:ressource:aktion: |
5 | # ## UI Label
6 | # Weiterführende Dokumentation
7 |
8 | type: oauth2
9 | description: |
10 | This API uses OAuth 2 with the client credentials flow. [More info](https://auth0.com/docs/flows/concepts/client-credentials).
11 | Der Europace Authorization Server ist erreichbar unter https://api.europace.de/.well-known/oauth-authorization-server."
12 | flows:
13 | clientCredentials:
14 | tokenUrl: https://api.europace.de/auth/token
15 | scopes: # Siehe auch https://swagger.io/specification/ (OAuth Flow Object - Scopes)
16 | partner:plakette:anlegen: |
17 | ## Partner anlegen
18 | Neue Organisationen oder Personen können erstellt werden.
19 | partner:plakette:lesen: |
20 | ## Partner lesen
21 | partner:plakette:schreiben: |
22 | ## Partner verändern
23 | partner:beziehungen:lesen: |
24 | ## Partner-Beziehungen lesen
25 | Zugriffs- und Einstellungsrechte können abgerufen werden.
26 | partner:beziehungen:schreiben: |
27 | ## Partner-Beziehungen schreiben
28 | Zugriffsrechte können vergeben werden.
29 | partner:rechte:lesen: |
30 | ## Partner-Rechte lesen
31 | partner:rechte:schreiben: |
32 | ## Partner-Rechte verändern
33 | partner:login:silent-sign-in: |
34 | ## Silent-Sign-In erlaubt
35 | Ermöglicht das öffnen von Europace im Browser ohne Passwortabfrage.
36 |
37 | report:rohdaten:lesen: |
38 | ## Vertriebs-Reports abrufen
39 | report:produktanbieter:lesen: |
40 | ## Produktanbieter-Report abrufen
41 |
42 | baufinanzierung:echtgeschaeft: |
43 | ## BaufiSmart-Echtgeschäft bearbeiten
44 | baufinanzierung:vorgang:lesen: |
45 | ## BaufiSmart-Vorgänge lesen
46 | baufinanzierung:vorgang:schreiben: |
47 | ## BaufiSmart-Vorgänge anlegen
48 | baufinanzierung:angebot:ermitteln: |
49 | ## BaufiSmart-Angebote ermitteln
50 | baufinanzierung:angebot:loeschen: |
51 | ## gespeicherte BaufiSmart-Angebote löschen
52 | baufinanzierung:ereignis:lesen: |
53 | ## BaufiSmart-Ereignisse lesen
54 | baufinanzierung:antrag:lesen: |
55 | ## BaufiSmart-Anträge lesen
56 | baufinanzierung:antrag:schreiben: |
57 | ## BaufiSmart-Anträge verändern
58 | Der Antragsstatus und der Sachbearbeiter können verändert sowie die Produktanbieter-Renferenz ergänzt werden.
59 |
60 | baufinanzierung:produktkonfiguration:lesen: |
61 | ## Produktkonfiguration lesen
62 | für Product-Cockpit
63 | baufinanzierung:produktkonfiguration:schreiben: |
64 | ## Produktkonfiguration verändern
65 | für Product-Cockpit
66 | baufinanzierung:produktkonfiguration:freigeben: |
67 | ## Produktkonfiguration freigeben
68 | für Product-Cockpit
69 | baufinanzierung:produkt:lesen: |
70 | ## Produkt lesen
71 | für Product-Cockpit
72 | baufinanzierung:produkt:schreiben: |
73 | ## Produkt verändern
74 | für Product-Cockpit
75 | baufinanzierung:produktanbieter:lesen: |
76 | ## Produktanbieter lesen
77 | für Product-Cockpit
78 | baufinanzierung:produktanbieter:schreiben: |
79 | ## Produktanbieter verändern
80 | für Product-Cockpit
81 |
82 | privatkredit:angebot:ermitteln: |
83 | ## KreditSmart-Angebote ermitteln
84 | Ratenkredit-Angebote und -Schaufensterkonditionen können ermittelt werden.
85 | privatkredit:antrag:schreiben: |
86 | ## KreditSmart-Anträge anlegen/verändern
87 | Anträge anlegen (annehmen) oder verändern (z.B. Antragsstatus).
88 | privatkredit:vorgang:lesen: |
89 | ## KreditSmart-Vorgänge lesen
90 | privatkredit:vorgang:schreiben: |
91 | ## KreditSmart-Vorgänge anlegen/verändern
92 | Vorgänge anlegen oder verändern.
93 |
94 | dokumente:dokument:lesen: |
95 | ## Dokumente herunterladen
96 | Dokumente können aus einem Vorgang oder Antrag gelesen (heruntergeladen) werden
97 | dokumente:dokument:schreiben: |
98 | ## Dokumente hinzufügen
99 | Dokumente können zu einem Vorgang oder Antrag hinzugefügt (hochgeladen) werden
100 |
101 | unterlagen:dokument:lesen: |
102 | ## Unterlagendokumente herunterladen
103 | Hochgeladene Dokumente eines Vorgangs können heruntergeladen werden.
104 | unterlagen:dokument:schreiben: |
105 | ## Unterlagendokumente hinzufügen und kategorisieren
106 | Dokumente zu einem Vorgang können hochladen, umbenannt, gelöscht und die Kategorisierung gestartet werden, damit die Dokumente in der Unterlagenakte zu Verfügung stehen.
107 | unterlagen:unterlage:lesen: |
108 | ## Unterlagen lesen
109 | Kategorisierte Dokumente (Unterlagen) können abgerufen werden.
110 | unterlagen:unterlage:schreiben: |
111 | ## Unterlagen neu zuordnen
112 | Die Kategorie und der Bezug der Unterlagen können geändert werden.
113 | unterlagen:unterlage:freigeben: |
114 | ## Unterlagen freigeben
115 | Unterlagen für einen Antrag können freigeben werden.
116 | unterlagen:freigabe:lesen: |
117 | ## Freigegebene Unterlagen lesen
118 | Freigegebene Unterlagen zu einem Antrag können abgerufen werden.
119 | unterlagen:freigabe:schreiben: |
120 | ## Freigegebene Unterlagen aktualisieren
121 | Der Status einer freigegeben Unterlagen kann verändert werden, um aus Produktanbietersicht den Empfang der Unterlagen zu bestätigen.
122 |
123 | impersonieren: |
124 | ## Impersonieren
125 | Aktionen können im Namen eines untergeordneten Partners ausgeführt werden.
126 | openid: |
127 | ## Benutzer-Identität überprüfen
128 | Die Anmeldung bei Europace kann angefordert werden, um die Identität des Benutzers zu überprüfen.
129 | profile: |
130 | ## Benutzerprofil lesen
131 | Profildaten (Vor- und Nachname, Benutzername, E-Mail und Avatar-Bild) des angemeldeten Benutzers können abgerufen werden.
132 |
133 | requiredAuthorities:
134 | baufinanzierung:echtgeschaeft:
135 | - BS_SICHTBAR
136 | - ECHTES_GESCHAEFT_ERLAUBT
137 | baufinanzierung:vorgang:lesen:
138 | - BS_SICHTBAR
139 | baufinanzierung:vorgang:schreiben:
140 | - BS_SICHTBAR
141 | baufinanzierung:ereignis:lesen:
142 | - BS_SICHTBAR
143 | baufinanzierung:antrag:lesen:
144 | - BS_SICHTBAR
145 | baufinanzierung:antrag:schreiben:
146 | - BS_SICHTBAR
147 |
148 | privatkredit:angebot:ermitteln:
149 | - KREDIT_SMART_SICHTBAR
150 | privatkredit:antrag:schreiben:
151 | - KREDIT_SMART_SICHTBAR
152 | privatkredit:vorgang:lesen:
153 | - KREDIT_SMART_SICHTBAR
154 | privatkredit:vorgang:schreiben:
155 | - KREDIT_SMART_SICHTBAR
156 |
157 | impersonieren:
158 | - DARF_EINSTELLUNGEN_OEFFNEN
159 |
--------------------------------------------------------------------------------