Amaan0907 commented on issue #729:
URL: https://github.com/apache/airavata/issues/729#issuecomment-6385414036

   Hi @DImuthuUpe, I'd like to work on this. Could you assign it to me?
   
   I'll focus on the backend side here and expose APIs the portal can use for 
the 2FA prompt. A few questions before I put together a design:
   
   1. **Which 2FA flows should this target?** TOTP/hardware tokens need the 
keyboard-interactive prompt relayed to the user and the typed code sent back. 
Duo push may need no input at all, just waiting for approval. Are there 
specific clusters in mind?
   2. **Temporal signal vs. blocking activity:** Should the workflow pause and 
resume on a signal when the user submits the code, or should an activity block 
while holding the SSH handshake open? Since the server waits for the answer on 
the live connection, this also affects where that connection is held while 
waiting.
   3. **Session cache policy:** How long should an authenticated connection be 
reused? Some sites cap session lifetime or concurrent connections, so I'm 
thinking of a per-cluster configurable limit, with re-prompting when the 
connection drops.
   4. **Code placement:** Should the prompt/response endpoints go in a new 
package under `api/`, or stay within the process code?
   
   On security, I plan to keep OTPs in memory only (out of the DB, Temporal 
history and `slog` output) and add rate limiting on the response endpoint.
   
   Also, SSH currently uses `InsecureIgnoreHostKey`. Once 2FA codes go over 
this channel, a MITM could capture a live OTP. I'll open a separate issue for 
host key verification unless you'd rather handle it here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to