Skip to content

Bypass OktaEnvironmentPostProcessorApplicationListener for specific profile #742

@jeffemandel

Description

@jeffemandel

I'm submitting a

  • [ x] feature request

Describe your request here (if necessary).

I have a Spring Boot 3.3 application that has two profiles - demo and production. Production is secured by Okta, demo is not. All of the classes that access okta-spring-boot are excluded in the demo profile. None-the-less, when I start the application in this profile, OktaEnvironmentPostProcessorApplicationListener tries to validate my application-demo.yml and complains that there is no Okta Issuer URL. If the check
ConfigurationValidator.validateIssuer(environment.getProperty("okta.oauth2.issuer")
was in the auto configure, it would be easy to disable in the application.yml:

spring:
    autoconfigure:
      exclude:
      - com.okta.spring.boot.oauth.OktaOAuth2AutoConfig

I know this is a minor annoyance that doesn't impact the security or leak sensitive information, but I hate seeing "Warning" in my logs.

SDK Version

3.0.7

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