Questions tagged [authorization]
Authorization is the process of determining whether a user, program or device is allowed to access a protected resource in a particular way. Authorization is a key theme in computer security practices.
10,500 questions
0
votes
0
answers
58
views
Why do I receive a 400 Bad Request instead of 403 when adding @PreAuthorize? [closed]
I have this bookUpdate() API and run it completely fine. But recently, I've added role to my User and ...
Advice
0
votes
1
replies
30
views
How to handle authorization in a microservices environment using session-based authentication?
I lack experience with system design, and I’m struggling to understand how all the pieces fit together. I’d appreciate some help seeing the “big picture.”
I’m building a web application with a ...
Best practices
1
vote
1
replies
17
views
Next.js App Router: enforcing non-bypassable server-side route gating with middleware vs server components
I’m implementing server-side route gating in a Next.js (v16+) App Router application where a user must complete a required step (e.g. identity verification or compliance flow) before accessing ...
2
votes
1
answer
81
views
How can I enforce server-side step completion before allowing access to a route in Next.js?
I’m building a Next.js application where users must complete a required step (for example, identity verification or a comprehension step) before being allowed to access certain protected routes.
The ...
0
votes
1
answer
64
views
Yii2 action requires authorization, although it's available to everyone
A dynamic banner is placed on the page of the published post (the banner is taken from the database). Under an authorized user, it loads normally, but if I go to the URL without authorization, it ...
Best practices
0
votes
0
replies
18
views
Good Authentication/Authorization method for media streaming platform
I’m building a music streaming platform (like Spotify) as a study project and I’m working on authen/author mechanism. Can I have some advices on what kind of authen/author I should use for the ...
1
vote
1
answer
70
views
FIRECRAWL_API_KEY Id is not getting value from .env file
I was following the Advent of Agent and was building the multi-agent app with Firecrawl.
When I am using this line FIRECRAWL_API_KEY: ...
0
votes
2
answers
78
views
Vue 3: Pinia Storage in Router Guards
My goal is to restrict access for authenticated users to the /login and /register routes
My Pinia Storage ...
0
votes
0
answers
74
views
.NET 8.0 getting session and authorization working together
I am having problems understanding how to get .NET 8.0 session and authorization working together.
Most of my controllers are decorated with the Authorize attribute,...
Advice
3
votes
1
replies
88
views
How to redact information in API depending on authorization of client in scalable way?
I am writing a forum-like API and I want to protect private information from unauthorized users. Depending on the role of client that makes a request to ...
0
votes
1
answer
38
views
apache auth-kerb and a user list to allow doesnt work
I guess the solution is quite easy, but I just dont see the point:
We had a kerb auth working, but s'one destroyed it quite a while ago.
Now I dont get it working again:
kerb authentication works and ...
0
votes
1
answer
112
views
401 Unauthorized despite sending login token in Headers
I am trying to do a POST request to an API endpoint api/auth/assign-role with this data:
...
0
votes
0
answers
40
views
AWS Error in Cloudfront + Appsync with 2 Authorizers OICD and new additional API_KEY, Cloudfront forcing x-api-key
I have an application that is in production working with Cloudfront + Appsync with OICD Authorizer. In the Cloudfront configuration for some reason it is adding in the custom headers if API_KEY exists ...
-1
votes
1
answer
52
views
Revoking Connected Devices: How to Invalidate IMemoryCache Immediately to Prevent 2-Minute Access Window?
Hey i was building a DeviceService to know Connected Devices to an account after i builded every thing now i got issue with revoking device
Main Confusion :
that i decided to use IMemoryCache to ...
Best practices
5
votes
2
replies
195
views
How did you implement Attribute-based Access Control (ABAC) in Spring Boot?
I’ve been working on an issue in our Spring Boot application for some time now: authorization. Because we have a more complex permission model — permissions depend not only on roles, but also on user-...
1
vote
0
answers
56
views
Checking authentication scheme from inside policy.RequireAssertion
I have an ASP.NET Core Web API that accepts tokens from two JWT sources. I want to define an authorization policy that will accept a token from the first source if and only if it has a particular ...
1
vote
1
answer
147
views
Custom Permissions in django-ninja which needs to use existing db objects
I am using django-ninja and django-ninja-extra for an api.
Currently I have some Schema like so
...
0
votes
0
answers
57
views
Matrix Synapse Azure / Microsoft SSO: what kind of value is saved / Stored from a Azure user (not object-id)
we want to migrate our LDAP users to SSO from our #synapse #matrix server and we have already many users, which are using Microsoft SSO Login. Matrix Synapse uses Authlib and there is a table (...
3
votes
0
answers
140
views
Fast lazy sort & deduplication over multiple sorted lazy sequences in Clojure
I implemented a few lazy sort & merge functions that are used heavily in my ReBAC authorization library, EACL, to lazily "merge" & deduplicate ~1M datoms emitted from Datomic's ...
0
votes
1
answer
128
views
Viewer SDK - Access Token Management with Automatic Routing
I am looking for guidance on how to configure authorization token management with automatic routing enabled in the Viewer SDK.
Our application sets up token refreshing using the ...
1
vote
0
answers
72
views
How to retrieve all permission details including resources, policies, and scopes from Keycloak?
I'm working with Keycloak and trying to fetch all permission details for a client, including the associated resources, policies, and scopes.
So far, the only API I found is the following:
...
0
votes
0
answers
50
views
How to write a custom meta annotation to check for authority when using Spring Security?
I have an enum with permission values:
...
0
votes
1
answer
77
views
How to keep getting the latest validation code in google authenticator for TOTP
I am implementing 2 Factor Authentication TOTP (Time-based One-Time Password) for a login page. After enter id and password, it will go to TOTP checking. It can only get the first code and won't ...
0
votes
1
answer
103
views
Where should roles and missions/ACLs be managed when building an authorization server?
I’m trying to build my own Spring Authorization Server (for learning purposes and possibly to use across multiple projects in the future).
I’m already familiar with Spring Security and resource server ...
0
votes
1
answer
345
views
How to handle feature and permission-based authorization in Next.js without delaying initial render?
I’m building a multi-tenant SaaS application with Django Ninja as the backend and Next.js as the frontend. I’m running into a problem around handling RBAC permissions and org-level feature ...
0
votes
2
answers
362
views
Managing Django groups and permissions for custom users
For my Django projects, I am used to creating a custom user model and managing what my user can do for a specific route using a roles field like this:
...
1
vote
1
answer
71
views
Different GrantedAuthority returning the same for getAuthority()
I have a spring application, where users can have various authorities and where some of those authorities can be scoped.
For example, the READ_ALLOWED authority is ...
0
votes
0
answers
77
views
Flex Gateway-MULE: Replace Authorization Header After OAuth Authentication for Backend Compatibility
Good morning,
I have a question regarding the use of Flex Gateway in MuleSoft. I would like to know if it's possible to configure, at the level of an experience API published on Flex Gateway, a way to ...
1
vote
0
answers
92
views
How can I programmatically determine if a PyMongo command is a read or write for permission logic (without a hardcoded command list)?
I'm building an authorization/access control system in a Python application that uses PyMongo to access MongoDB. I need to dynamically decide—at runtime and for arbitrary query shapes—whether a given ...
0
votes
2
answers
318
views
Middleware not triggering in Next.js app using next-auth
I’m working on a Next.js 14 app with the App Router and next-auth@5. I followed the official Next.js Learn guide on authentication, except I replaced ...
-1
votes
1
answer
140
views
Blazor Web App (.NET 9) InteractiveClient Mode: No Built-in Authentication/Authorization?
I'm building a Blazor web app using .NET 9 and targeting interactive client render mode (InteractiveWebAssembly) and authenticating with Entra ID (and using Entra ...
0
votes
1
answer
127
views
Blazor Server collocated JavaScript causing crash on Blazor connection timeout due to auth CORS policy
We have a Blazor Server app that requires authorization on all its components (internal business app):
...
0
votes
1
answer
51
views
SAML User identification on Service Provider
In certain Identity Providers (IDPs), users can change their email addresses. Therefore, relying on email addresses for user identification on the Service Provider (SP) side is not feasible. When ...
0
votes
0
answers
285
views
How to Properly Implement ABAC (Attribute-Based Access Control) Authorization?
In my Next.js application, I have these roles:
manager
technician
front-desk
...
1
vote
1
answer
88
views
React doesn’t receive API tokens after Google OAuth redirect via social_django/drf-social-oauth2
I'm implementing Google OAuth2 for my Django REST API with a React frontend. The basic flow is set up correctly.
I have routes for:
...
0
votes
0
answers
71
views
Authorization in OpenSearch Dashboards plugin
I am currently browsing official repository of OpenSearch Dashboards and documentation for a while. I am developing my OpenSearch Dashboards plugin. My plugin does have built-in Node.js server, that ...
0
votes
0
answers
51
views
MinIO External Access Management Plugin traffic reduction
I am working on a MinIO cluster that receives around 20k RPS.
I am using a custom authorization service, which is essentially a proxy, that contains all the authorisation logic.
If a request is marked ...
0
votes
0
answers
91
views
Implement permify in Spring boot application
I am trying to implement permify authorisation in my spring boot application. I want to know how can I upload schema to permify database inorder to create relationships.
Can someone provide the ...
0
votes
0
answers
37
views
How do I get the bearer token for sending a FCM message through a POST request in C#?
I am trying to send an FCM message through my .net API. I was originally trying to use FirebaseAdmin sdk, but was unsuccessful. I have been able to get it to work using a POST request. However, I am ...
0
votes
0
answers
74
views
How to use Identity API endpoints in an ASP.NET Core web project without custom middleware?
I'm developing a .NET Core Identity API using the following setup:
...
0
votes
0
answers
172
views
"Google Apps Script blocked: 'Application Blocked' / 'Unexpected Error' on simple script, but works on different Google account"
I'm experiencing a persistent issue with Google Apps Script in Google Sheets on my primary Google account. Whenever I try to run any Apps Script, including a very basic "Hello World" type ...
0
votes
0
answers
27
views
Google Identity Services - AuthorizationClient not starting a fresh flow immediately after a user revokes access to the app
On this page - https://developer.android.com/identity/authorization
For authentication, we recommend using the Credential Manager API. For authorizing actions that need access to user data stored by ...
0
votes
0
answers
44
views
What authorization am I missing when writing a PATCH API to Autodesk Construction Cloud?
The goal of my API is to allow a batch PATCH of asset statuses in ACC. When I run my code, I am getting error code 403 which is "The request was not accepted because the client is authenticated, ...
0
votes
1
answer
82
views
How to log in to a website using the requests library (python)?
There is a website where I need to log in
requests with authorization are sent to https://auth.dikidi.ru/ajax/check/auth/
This is my code:
...
1
vote
1
answer
124
views
How to avoid re-authorization of App Script?
I have written an apps script connected to my google spreadsheet to export it to a JSON file.
The data is need in an android application that I am building and access via the Web App "/exec" ...
2
votes
1
answer
68
views
How to override the pundit authorize method for namespaced policies under ruby 3.x
The pundit documentation suggests that when using namespaced policies for something like Admin views, it can be useful to override the authorize helper in your AdminController to automatically apply ...
1
vote
2
answers
710
views
Entra optional claim of login_hint seems to always be blank
I'm currently working on a blazor webassembly app, to which users get to authenticate themself using Microsoft Entra ID. This all works fine and dandy, but I'm trying to optimise the experience. ...
0
votes
2
answers
69
views
Where should I store non-sensitive user details (like name or avatar) in a React web app?
In a typical React web app, after a successful login via JWT, I often store user details like firstName, lastName, ...
0
votes
1
answer
790
views
Strapi - ValidationError: Invalid key when using authenticated API call with filters
I'm working on a Strapi v5 server and have set up the following tables:
Referrant – has many Agents.
Agent – has many Referrants.
ReferrantToAgent – a conjunction table to handle the many-to-many ...
0
votes
0
answers
69
views
Keycloak 25 - Nginx - Authorization Code with "client_data" query parameter
I have a docker-compose setup with Keycloak (v.25), postgres and nginx. Nginx is a proxy-server.
The setup works fine for the admin; but for the authorization, I can't get the login screen to redirect ...