Skip to content

Keystone read APIs and repository state#7

Draft
JSYoo5B wants to merge 11 commits into
codex/05-store-layer-consolidationfrom
codex/06-keystone-read-repository-state
Draft

Keystone read APIs and repository state#7
JSYoo5B wants to merge 11 commits into
codex/05-store-layer-consolidationfrom
codex/06-keystone-read-repository-state

Conversation

@JSYoo5B

@JSYoo5B JSYoo5B commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds Keystone read APIs for projects, users, roles, services, and endpoints.
  • Moves identity principals, issued tokens, and service catalog state behind repositories.
  • Adds SQLite-backed identity repositories for seeded and durable state.

Main Review Points

  • Identity repository boundaries and default seeded state.
  • Token persistence behavior.
  • Service catalog persistence and Gophercloud-compatible responses.

Verification

  • go test ./...

config: cfg,
repositories: repositories,
}
service.SeedDefaults()

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeding defaults in the repository-backed constructor makes Keystone state available to both memory and SQLite implementations. That is why identity moves to repositories before the broader service expansion.

}
}

func (s Service) Reset() {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reset clears repository state and then reseeds defaults. This keeps test reset behavior deterministic while still allowing durable repositories to start from explicit stored state later.

}
}

func (s Service) defaultEndpoints() []EndpointDefinition {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default catalog paths are the bridge between Keystone and every mounted service router. When service route prefixes change, this is the file that must change with them.

panic(fmt.Errorf("marshal identity token: %w", err))
}

_, err = r.db.Exec(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tokens are upserted instead of inserted once. That keeps the repository tolerant of repeated seed/test flows while still storing the complete issued token payload.

@JSYoo5B JSYoo5B marked this pull request as draft July 2, 2026 21:09
@JSYoo5B JSYoo5B force-pushed the codex/05-store-layer-consolidation branch from c9c3ad2 to 45e072e Compare July 5, 2026 12:50
@JSYoo5B JSYoo5B force-pushed the codex/06-keystone-read-repository-state branch from 9275327 to 7e58142 Compare July 5, 2026 12:50
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