Data Flow¶
The data flow process involves several key steps, outlined below:
-
Client Request
- The client application sends an API request to the system. This request includes an authentication token and the necessary data or parameters for the API endpoint.
-
Istio Service Mesh
- The request first passes through the Istio Service Mesh.
-
Envoy Filter Interception
- The custom Envoy Filter, written in Go, intercepts the request and begins processing.
-
Public Key Retrieval
- The Envoy Filter fetches and caches the public key from Keycloak, which will be used to verify the authentication token.
-
Token Verification
- The Envoy Filter verifies the token's signature using the fetched public key. It also checks the token's validity, expiration date, and any other claims.
-
Role and Permission Check
- After verifying the token, the Envoy Filter checks the user's roles and permissions encoded within the token.
-
Revoked Token Check
- The Envoy Filter fetches and caches revoked tokens from the database, then checks if the token is revoked. If revoked, it responds with an unauthorized message to the client.
-
Forward Valid Request
- If the token is valid and the user has the necessary roles and permissions, the Envoy Filter forwards the request to the AI/ML API Server.
-
ML Model Interaction
- The API Server interacts with the appropriate machine learning (ML) model(s) based on the functionality requested.
-
ML Model Processing
- The ML model(s) process the input data and generate the requested output, such as predictions, classifications, or analyses.
-
API Response
- The API Server packages the output from the ML model(s) into an appropriate response format and sends it back to the client application through the secure communication channel.