http request from client app #6764
-
Exploring a POC on custom authentication path which requires to invoke an REST API to another container on the same pod (localhost). Assumption is the authentication phase is pre transaction execution hence is valid. Please suggest if thats not the case. Are there any libraries on CCF that can be leveraged to invoke HTTP request? Not familiar with openenclave, but enclave restricts socket connections from cpp-httplib even when linked to enclave target or with an application level socket based HTTP request. Do these require additional openenclave call mappings to be setup ? Any suggestions would be helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @bsenthilr,
Authentication also depends on the current KV state (ie - it may read from the KV to determine the caller's current auth status), is executed as part of the same transaction, and hence has the same expectations as any other code running inside a CCF handler. It should (generally) compute something that's purely determined by the KV state and incoming request (not un-attestable data retrieved from elsewhere), and must execute synchronously (and reasonably quickly, as long blocking periods will stall other requests). There are a few escape hatches you can explore to do this:
The simpler solution is to redesign this so that CCF doesn't need to call out - have some external system pushing data in to CCF. That way you get a clearer auth story (how does the process pushing this data authenticate itself?), and a clearer transactional audit story (what state did CCF use for a later auth validation? Whatever was written to the KV at that time). |
Beta Was this translation helpful? Give feedback.
Hi @bsenthilr,
Authentication also depends on the current KV state (ie - it may read from the KV to determine the caller's current auth status), is executed as part of the same transaction, and hence has the same expectations as any other code running inside a CCF handler. It should (generally) compute something that's purely determined by the KV state and incoming request (not un-attestable data retrieved from elsewhere), and must execute synchronously (and reasonably quickly, as long blocking periods will stall other requests).
There are a few escape hatches you ca…