Skip to content

[Enhancement]: Simulate Claims in Development #2367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JerryNixon opened this issue Sep 6, 2024 · 0 comments
Open

[Enhancement]: Simulate Claims in Development #2367

JerryNixon opened this issue Sep 6, 2024 · 0 comments
Assignees
Labels
auth enhancement New feature or request
Milestone

Comments

@JerryNixon
Copy link
Contributor

JerryNixon commented Sep 6, 2024

What is it?

  • Simulate custom token claims for development and testing scenarios.
  • Allow testing of authentication and role-based policies without a live Azure Entra ID tenant.
  • Provide simulator-claims under the Simulator provider for flexible role/claim injection during development.

Currently, using Simulator grants the default role authenticated, but doesn't allow injecting claims for policy testing. This enhancement introduces simulator-claims, letting developers test claims-based logic locally.

Configuration Example

{
  "authentication": {
    "provider": "Simulator",
    "simulator-claims": {
      "roles": ["admin"],
      "groups": ["dev-team"],
      "custom_claims": {
        "region": "US",
        "accessLevel": "developer"
      }
    }
  }
}

This lets developers test scenarios based on simulated roles and claims without needing Azure Entra ID.

Environment-Specific Config

To prevent accidental deployment of simulated claims to production, use environment-specific configuration files (e.g., appsettings.Development.json). This allows developers to safely use simulator-claims during development while keeping production configuration clean.

Benefits

  • Test role-based access and claims scenarios without external dependencies.
  • Ensure policies behave as expected in local environments.
  • Use environment-specific config files to avoid deploying simulation settings to production.

Related Issues to Close

@JerryNixon JerryNixon added the enhancement New feature or request label Sep 6, 2024
@JerryNixon JerryNixon self-assigned this Sep 6, 2024
@seantleonard seantleonard added this to the October2024-March2025 milestone Sep 11, 2024
@Azure Azure deleted a comment from seantleonard Sep 11, 2024
@JerryNixon JerryNixon changed the title ⭐ [Enhancement]: Simulate Claims in Development [Enhancement]: Simulate Claims in Development Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants