How would you handle user authorization when they sign in to the interface and upload documents?
Asked at
AI answer
When a user signs in, the backend verifies their credentials or delegates authentication to an identity provider via OIDC/OAuth2. After successful authentication, the user receives a secure session or token; with every request, the server checks not only the user’s identity but also their permission to access the requested resource. To upload a document, the backend first checks the user’s permissions and creates a record with metadata and a status, then issues a short-lived signed URL for uploading to private Object Storage. After upload, the file is checked for size and permitted format, scanned for viruses, and its status is updated. Do not rely solely on checks in the browser or on the file name; with cookie-based sessions, CSRF protection must also be considered.
Also asked at Т1
- What enables the OpenSearch engine to return results quickly across a huge database (what algorithm is it based on)?
- How can you tell that a service is showing signs of degradation or has stopped functioning? What error codes would you expect?
- Why is Object Storage used in this architecture, and what exactly do we store there?
- Based on your experience, name an example of a task similar to the architecture we discussed. How exactly were the microservices interactions and event delivery set up?
- How do you calculate Precision, and how does it differ from Recall?
Similar questions
- The permission layer is a single point. How did you check permissions when they needed to be checked inside the business logic?
- What would your test plan be for an authentication form (username/password/Log in button)? What would you clarify with the analyst and developers?
- Where could you put a password in a request to compromise security, and how should it be transmitted correctly?
- How do you implement authentication in FastAPI?
- In the context of a microservices architecture, what advantages would you highlight in using JWT?