Skip to content

Cannot override/set jwt.secret with 7.0.0-M3 #1114

@ZenHarbinger

Description

@ZenHarbinger

Expected Behavior

in application.yml with the following settings:

grails:
  plugin:
    springsecurity:
      rest.token.storage.jwt:
        privateKeyPath: /pub/private_key.der
        publicKeyPath: /pub/public_key.der
        secret: cFFqts8#7PI#JefB!v0j2fjhy6ZuYG0N

spring:
  autoconfigure:
    exclude:
      - org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration
      - org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration
      - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
      - org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration
      - org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientAutoConfiguration
      - org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration
      - org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration

The application should load my settings.

Actual Behaviour

Caused by: java.lang.IllegalStateException: java.lang.Exception: A JWT secret must be defined. Please provide a value for the config property: grails.plugin.springsecurity.rest.token.storage.jwt.secret

Stepping through the code, no values in the config are as read from my file.

Steps To Reproduce

No response

Environment Information

  • Linux
  • Corretto JDK 17.0.15

Example Application

No response

Version

7.0.0-M3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions