Isolating User Sessions for AWS Credentials in a Django-Kubernetes Web Application

21 views Asked by At

I am currently developing a web application using Django that takes AWS credentials from the user and retrieves data from their specific AWS bucket. Each user has distinct AWS credentials and accesses different AWS buckets. The AWS credentials are used temporarily for the duration of the user session until logout.

The application is set up such that it uses the AWS credentials to retrieve data through Python code, using these credentials for the duration of the session. The goal is to deploy this application on a Kubernetes cluster.

Now, I am facing a scenario where multiple users could be accessing the application simultaneously. Here are the specifics:

  1. User 1 logs in to the application on Computer 1 using AWS Credentials 1.
  2. User 2 logs in to the application on Computer 2 using AWS Credentials 2.

In the given scenario, it is crucial that User 1 only sees data from the AWS bucket associated with AWS Credentials 1, and User 2 only sees data from the AWS bucket associated with AWS Credentials 2. The data shown to one user should not be mixed up or reflected on the other user's screen, even upon page refreshes.

My question is, how can I ensure this isolation of user sessions so that one user's data never appears for another user? Any guidance on managing the user sessions in Django or setup in Kubernetes for this type of use case would be appreciated.

0

There are 0 answers