You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: auth.md
+60-56
Original file line number
Diff line number
Diff line change
@@ -122,48 +122,55 @@ sequenceDiagram
122
122
123
123
## Option C (Proposal Swen)
124
124
125
-
### Initial thoughts
125
+
### Initial thoughts and running environment
126
126
127
127
**Ingestor**
128
128
129
129
- can run anywhere
130
-
- therefore, it cannot contain any secret
131
-
- needs to talk to SciCat and Archiver Service API
132
-
- needs to be authorised with a user token
130
+
- as a central service
131
+
- as a desktop application
132
+
- it cannot contain any secret (e.g. service account for SciCat)
133
+
- app must be authorised by the user
133
134
134
135
**User**
135
136
136
-
- does not want to log in all the time
137
-
- is only interested in starting a job
137
+
- does not want to log in all the time (single sign-on preferred)
138
+
- is only interested in _starting_ a job, e.g.
138
139
- archive data
139
140
- unarchive data
140
-
- his authentication token can time out
141
+
- the user's authentication token can time out
142
+
- the job itself needs to be able to report when its done, independently of the user
141
143
142
144
**SciCat**
143
145
144
146
- only accepts authenticated requests
147
+
- currently only SciCat tokens
148
+
- Service Accounts
145
149
- issues its own SciCat tokens (JWT with HS256 algorithm, aka Β«self signedΒ»)
146
150
- after a user has successfully logged in to Keycloak
147
-
- currently only accepts SciCat tokens
148
-
- so it acts as an authority instance
151
+
- acts as an authority instance
149
152
- offers a self-made mechanism to check if a SciCat token is valid
150
153
151
-
**Archiver Service**
154
+
**ETHZ Archiver Service**
152
155
153
156
- only accepts authenticated requests
154
-
- issues Keycloak service tokens (JWT with RS256, public key signed)
155
-
- currently only accepts JWT tokens issued and signed by Keycloak
157
+
- JWT RS256 tokens issued and signed by Keycloak
158
+
- JWT HS256 tokens issued by SciCat
159
+
- can issue a Ingester token for a valid SciCat token
160
+
- has service account for SciCat
161
+
- must be able to report the status of a dataset any time to SciCat
156
162
157
-
### What needs to be done
163
+
### Use-case: User archives data (MinIO S3 Storage)
158
164
159
-
- Archiver Service
160
-
- needs to be able to accept SciCat π as well (see ScopeMArchiver#146)
161
-
- needs to be able to create valid SciCat π (variant A)
162
-
- SciCat
163
-
- can exchange Ingestor JWT π for Ingestor SciCat π (variant B)
164
-
- accepts all JWT π issued and signed by Keycloak (variants C+D)
165
+
**Notes**:
165
166
166
-
**Note**: the diagram below does not yet include any authorisation information. It only includes authentication. In future we would like to use JWT π that contain authorisation information, e.g. tokens for every dataset upload.
167
+
- the diagram below does not include any authorisation information, only authentication.
168
+
- In future we would like to use JWT π that contain authorisation information, e.g. tokens for every dataset upload.
169
+
- ETH uses MinIO S3 instead of Globus
170
+
- the ETHZ Archiver Service has service accounts:
171
+
- for S3 to get pre-signed URLs for data upload
172
+
- for SciCat to report when the archiving of a dataset has finished
173
+
- PSI needs a similar service to ensure reporting back to SciCat
167
174
168
175
169
176
```mermaid
@@ -172,46 +179,43 @@ sequenceDiagram
172
179
participant B as Browser
173
180
participant S as Scicat Backend
174
181
participant I as Ingestor Service
175
-
participant G as Storage (Globus)
176
182
participant A as ETHZ Archiver Service
183
+
participant M as MinIO S3 Storage
177
184
participant K as Keycloak
178
185
179
-
B -) S: Access
186
+
Note over B, K: Authorise User
187
+
B -) S: request access
180
188
S -) K: User Login (redirect)
181
-
K --) S: User JWTπ
182
-
S ->> S: Exchange User JWT π for SciCat π
183
-
S --) B: User SciCat π
184
-
B --) I: User SciCat π
185
-
I --) A: User SciCat π
186
-
alt tbd. ScopeMArchiver issue 146
187
-
A -) S: verify + request User info (User SciCat π)
188
-
S -) A: OK + User info
189
-
end
190
-
A -) K: request Ingestor JWT π (user/pw)
191
-
K --) A: Ingestor JWT π
192
-
A --) I: Ingestor JWT π
193
-
I ->> I: store refresh-token of Ingestor JWT π
194
-
I -) A: request S3 credentials (Ingestor JWT π)
195
-
A --) I: S3 credentials
196
-
I ->> I: upload to S3 β³
197
-
I -) A: report S3 upload finished (Ingestor JWT π)
198
-
199
-
alt Variant A: Archiver can create Ingestor SciCat π
200
-
A -) S: request Ingestor SciCat π (secret/Basic Auth)
201
-
S --) A: Ingestor SciCat π
202
-
A --) I: Ingestor SciCat π
203
-
I -) S: report dataset upload finished (Ingestor SciCat π)
0 commit comments