Skip to content

Provide a way to avoid resolving the authentication for some URL pattern #2267

Description

@loicmathieu

Feature description

We use basic JWT authentication with cookie enabled.
We noticed that, for static assets, the authentication is still loaded which due to our security layer do a query on database.

We do configure

micronaut:
  security:
    intercept-url-map:
      - pattern: "/ui/**"
        access: "isAnonymous()"

But even with that, when the cookie is added to the asset request, the cookie authentication is performed.
This is because the Authentication object is resolved even for anonymous path so you can inject an optional Authentication object.

We would need a way to bypass authentication resolving entirely for some URL pattern.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions