Skip to content

Identity & security foundation #15

@coopernetes

Description

@coopernetes

Motivation

jgit-proxy currently has no concept of authenticated users:

  • REST API is fully open
  • reviewerUsername in Attestation is an unverified string
  • DummyUserAuthorizationService always returns true
  • HTTP Basic challenge to git clients is never validated

This tracked the full AuthN/AuthZ/identity work. All phases are now either complete or have been broken out into standalone issues.


Data Model ✅

Three tables underpin the whole identity system — all implemented.


Phase 0 — Spring Security foundation ✅

  • SecurityConfig with form login, CSRF, stateful sessions
  • reviewerUsername derived from SecurityContext principal
  • Static users from YAML config wired as InMemoryUserDetailsManager
  • Route protection — all API routes require authentication

Phase 1 — Pluggable identity providers ✅

  • StaticUserStore (YAML, read-only) and JdbcUserStore / MutableUserStore
  • CheckUserPushPermissionHook / CheckUserPushPermissionFilter + BasicAuthChallengeFilter
  • StaticUserAuthProvider and JdbcUserAuthProvider
  • LdapAuthenticationProvider with LdapEmailContextMapperauth.provider: ldap
  • OIDC authorization code flow via oauth2Loginauth.provider: oidc

Phase 2 — Identity linking ✅


Phase 3 — Upstream SCM OAuth

Tracked in #40.


Phase 4 — Push attribution enforcement ✅

  • IdentityVerificationHook (order 160) — configurable via commit.identity-verification: strict | warn | off
  • PushRecord.userEmail populated from authenticated principal
  • SCM username cross-referenced against user_scm_identities via TokenPushIdentityResolver

Remaining work (tracked in separate issues)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authAuthentication, authorization, identityenhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions