Skip to content

feat: unified actor session and claims mapping#2

Merged
Taure merged 2 commits intomainfrom
feat/unified-actor-session
Mar 26, 2026
Merged

feat: unified actor session and claims mapping#2
Taure merged 2 commits intomainfrom
feat/unified-actor-session

Conversation

@Taure
Copy link
Copy Markdown
Owner

@Taure Taure commented Mar 26, 2026

Summary

  • Add nova_auth_actor for strategy-agnostic session storage (Nova ETS)
  • Add nova_auth_claims for provider claim transformation (static map or callback)
  • Add allow_claim/2 policy for claim-based authorization
  • Make kura optional (optional_applications) so OIDC-only apps don't need a database
  • Simplify nova_auth_security to use the shared actor session

Test plan

  • All 23 CT tests pass (config, policy, claims)
  • rebar3 fmt --check clean
  • rebar3 xref clean
  • rebar3 dialyzer no new warnings
  • elp lint no new warnings
  • elp eqwalize-all no new errors in changed files

Add nova_auth_actor for strategy-agnostic session storage, nova_auth_claims
for provider claim transformation, and allow_claim/2 policy. Make kura
optional so OIDC-only apps don't need a database. Simplify security
callbacks to use the shared actor session.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

🟠 Code Coverage — 68.5%

170 of 248 lines covered.


🛡️ Security Audit

No vulnerabilities found in 12 dependencies.

Hank flagged it as dead code — the session key is defined locally
in nova_auth_actor instead.
@Taure Taure merged commit 010e7ed into main Mar 26, 2026
13 of 16 checks passed
Taure added a commit that referenced this pull request Mar 31, 2026
* feat: unified actor session and claims mapping

* feat: add unified actor session and claims mapping

Add nova_auth_actor for strategy-agnostic session storage, nova_auth_claims
for provider claim transformation, and allow_claim/2 policy. Make kura
optional so OIDC-only apps don't need a database. Simplify security
callbacks to use the shared actor session.

* fix: remove unused NOVA_AUTH_ACTOR_SESSION_KEY macro

Hank flagged it as dead code — the session key is defined locally
in nova_auth_actor instead.

* feat: make PBKDF2 iterations configurable

Read from `{nova_auth, [{pbkdf2_iterations, N}]}` app env.
Defaults to 600,000 (OWASP recommendation). Lower values
trade security margin for speed in non-banking contexts.
Taure added a commit that referenced this pull request Mar 31, 2026
* feat: unified actor session and claims mapping

* feat: add unified actor session and claims mapping

Add nova_auth_actor for strategy-agnostic session storage, nova_auth_claims
for provider claim transformation, and allow_claim/2 policy. Make kura
optional so OIDC-only apps don't need a database. Simplify security
callbacks to use the shared actor session.

* fix: remove unused NOVA_AUTH_ACTOR_SESSION_KEY macro

Hank flagged it as dead code — the session key is defined locally
in nova_auth_actor instead.

* feat: make PBKDF2 iterations configurable

Read from `{nova_auth, [{pbkdf2_iterations, N}]}` app env.
Defaults to 600,000 (OWASP recommendation). Lower values
trade security margin for speed in non-banking contexts.
Taure added a commit that referenced this pull request Mar 31, 2026
* feat: unified actor session and claims mapping

* feat: add unified actor session and claims mapping

Add nova_auth_actor for strategy-agnostic session storage, nova_auth_claims
for provider claim transformation, and allow_claim/2 policy. Make kura
optional so OIDC-only apps don't need a database. Simplify security
callbacks to use the shared actor session.

* fix: remove unused NOVA_AUTH_ACTOR_SESSION_KEY macro

Hank flagged it as dead code — the session key is defined locally
in nova_auth_actor instead.

* docs: update README and guides for unified actor session

- Update README to reflect optional kura, actor session, and link to nova_auth_oidc
- Update getting-started guide with OIDC-only and password auth paths
- Update configuration guide with optional password keys and actor type
- Add actor-session guide explaining the unified session concept
- Add claims-mapping guide with static and callback examples
- Add policies guide covering allow_claim and OIDC integration
- Update ex_doc config with new guides and Taure source URL

* chore: disable audit, upgrade erlang-ci to v2.0.9 (#4)

* chore: disable audit, upgrade erlang-ci to v2.0.9, fix permissions

* fix: add kura to plt_extra_apps for dialyzer

* feat: make PBKDF2 iterations configurable (#2)

* feat: unified actor session and claims mapping

* feat: add unified actor session and claims mapping

Add nova_auth_actor for strategy-agnostic session storage, nova_auth_claims
for provider claim transformation, and allow_claim/2 policy. Make kura
optional so OIDC-only apps don't need a database. Simplify security
callbacks to use the shared actor session.

* fix: remove unused NOVA_AUTH_ACTOR_SESSION_KEY macro

Hank flagged it as dead code — the session key is defined locally
in nova_auth_actor instead.

* feat: make PBKDF2 iterations configurable

Read from `{nova_auth, [{pbkdf2_iterations, N}]}` app env.
Defaults to 600,000 (OWASP recommendation). Lower values
trade security margin for speed in non-banking contexts.

* feat: add OIDC behaviour and JWT validation (#4)

* feat: add OIDC behaviour and JWT validation module

nova_auth_oidc defines the callback for OIDC provider configuration
(providers, scopes, claims mapping). nova_auth_oidc_jwt validates
ID tokens and maps claims to actor maps via nova_auth_claims.

* fix: suppress hank false positive for behaviour callback

* fix: restructure JWT decode for dialyzer compatibility

* fix: use erlang-ci @v2

* fix: start kura application in integration test setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant