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
+97
Original file line number
Diff line number
Diff line change
@@ -118,3 +118,100 @@ sequenceDiagram
118
118
119
119
- Accept Ingestor-JWT as a valid login method. This may require token exchange, since
120
120
scicat and the ingestor have different clientIds
121
+
122
+
123
+
## Option C (Proposal Swen)
124
+
125
+
### Initial thoughts
126
+
127
+
**Ingestor**
128
+
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
133
+
134
+
**User**
135
+
136
+
- does not want to log in all the time
137
+
- is only interested in starting a job
138
+
- archive data
139
+
- unarchive data
140
+
- his authentication token can time out
141
+
142
+
**SciCat**
143
+
144
+
- only accepts authenticated requests
145
+
- issues its own SciCat tokens (JWT with HS256 algorithm, aka Β«self signedΒ»)
146
+
- after a user has successfully logged in to Keycloak
147
+
- currently only accepts SciCat tokens
148
+
- so it acts as an authority instance
149
+
- offers a self-made mechanism to check if a SciCat token is valid
150
+
151
+
**Archiver Service**
152
+
153
+
- 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
156
+
157
+
### What needs to be done
158
+
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
+
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
+
168
+
169
+
```mermaid
170
+
sequenceDiagram
171
+
autonumber
172
+
participant B as Browser
173
+
participant S as Scicat Backend
174
+
participant I as Ingestor Service
175
+
participant G as Storage (Globus)
176
+
participant A as ETHZ Archiver Service
177
+
participant K as Keycloak
178
+
179
+
B -) S: Access
180
+
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