Skip to content

Add researcher profile API and identity linking#486

Open
jayvenn21 wants to merge 2 commits into
apache:masterfrom
jayvenn21:feature/unified-profile-scaffold
Open

Add researcher profile API and identity linking#486
jayvenn21 wants to merge 2 commits into
apache:masterfrom
jayvenn21:feature/unified-profile-scaffold

Conversation

@jayvenn21

@jayvenn21 jayvenn21 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a ResearcherProfile model for researcher-specific metadata attached to an existing Custos user
  • add a ResearcherProfileStore interface and MySQL-backed store implementation
  • add researcher_profiles database migration with a one-to-one relationship to users
  • add service methods for researcher profile create/get/update/delete
  • add REST endpoints and OpenAPI documentation for researcher profile management
  • add a user identity link flow for external identities such as ORCID, CILogon, ACCESS, and NAIRR
  • add integration tests for researcher profile round-trip behavior and ORCID-style identity linking
  • remove the standalone SQL profile scaffold that used separate profiles, profile_emails, and external_identities tables

Notes

This aligns the researcher profile scaffold with the existing Custos identity model:

  • users remains the stable Custos user identity
  • user_identities remains the place for external identities such as ACCESS, NAIRR, CILogon, and ORCID
  • researcher_profiles stores additional researcher metadata such as display name, research domain, research capabilities, department, and institution

Project memberships, group memberships, allocations, and publications are intentionally left out of this scaffold because they belong to separate relationship/domain models.

Validation

  • gofmt -w pkg/models/profile.go internal/store/store.go internal/store/researcher_profile_store.go pkg/service/researcher_profile.go pkg/service/researcher_profile_integration_test.go pkg/service/integration_common_test.go internal/server/server.go
  • go generate ./pkg/service/...
  • go generate ./cmd/server
  • go build ./...
  • go vet ./...
  • go test ./...
  • go test -tags=integration ./pkg/service -run 'TestResearcherProfileRoundTrip|TestLinkUserIdentityLinksORCIDToExistingUser'
  • git diff --check

@jayvenn21 jayvenn21 changed the title Add unified researcher profile scaffold Add user-linked researcher profile store Jun 5, 2026
@jayvenn21 jayvenn21 marked this pull request as ready for review June 18, 2026 02:46
@jayvenn21 jayvenn21 changed the title Add user-linked researcher profile store Add researcher profile API and identity linking Jun 18, 2026
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