Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: enable key rotation#15066

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sreya merged 42 commits intomainfromjon/glue
Oct 25, 2024
Merged

feat: enable key rotation#15066

sreya merged 42 commits intomainfromjon/glue
Oct 25, 2024

Conversation

sreya
Copy link
Collaborator

@sreyasreya commentedOct 14, 2024
edited
Loading

This PR contains the remaining logic necessary to hook up key rotation to the product.

closescoder/internal#52

This commit updates the cryptographic key handling by separatingworkspace app token and API key features. It corrects feature identifiersfor clearer distinction between OIDC conversion and API key usage, enhancingthe maintainability and clarity around cryptographic key usage within thesystem. Additionally, reworks related tests and migration scripts to alignwith these changes.
- Consolidates key cache handling by replacing legacy key cache references with central key caches.- Enhances modularity and maintainability by using consistent key management methods.- Removes redundant `StaticKeyManager` implementation for streamlined code.- Adjusts cryptographic key generation and cache utilization across critical components.
Enhances flexibility by making the `Fetcher` interfacereceive a `CryptoKeyFeature` parameter. This change alignsvarious call sites that implement or utilize `Fetcher`, allowingfor more granular queries.
- Improve code clarity by refactoring key caching logic.- Simplify logger initialization for signing and encryption caches.- Ensure consistent closing of caches in the API and server.
This change enhances the crypto_keys table by updating enumhandling for features. It introduces distinct roles for keystorage, aiding in better distinction and maintenance of keyfeatures.
- Improve clarity by naming loggers used in key cache creation.- Adjust key cache context to utilize KeyReader for consistent  context handling.- Refactor API to use central key cache management approach.- Enhance error messages for crypto key fetching.- Update test to add safety against unexpected panics.
- Enhance testing scenarios for cryptokey features including cases  with no keys and specific key states.- Update tests to ensure new cryptokey features are handled correctly.- Remove outdated migration scripts for cryptokey features as they  are not required anymore.- Refactor workspace proxy keys to only allow whitelisted  cryptokey features, improving security and stability.
Enhances the cache functionality by wrapping the context with a keyreader, ensuring proper authorization checks during cryptographicoperations. This change aligns cache behavior with security practices.
Adjust comments to accurately describe cache functionalityand fix a typo in the `New` function parameters for clarity.
@sreyasreya marked this pull request as ready for reviewOctober 17, 2024 02:49
Refactored various tests to eliminate the need for manually setting upa database connection and generating crypto keys. This change simplifiesthe test setup and makes it less dependent on database-specificconfigurations, aligning with recent structural refactoring.
Ensure that logging only occurs when an error is present during the initialization of the key caches. This prevents unnecessary log entries when no error is encountered, improving log clarity and reducing noise.
Remove redundant database setup for tests by generating keys in memory.Enhance tests by validating both inclusion and exclusion of specific keys.
Copy link
Contributor

@spikecurtisspikecurtis left a comment

Choose a reason for hiding this comment

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

LGTM

移動StaticKeyからcryptokeysパッケージへのjwtutils。これにより、jwtutilsとのセキュリティおよび独立性の一貫性が強化されます。また、tailnetの依存関係を減らします。
@sreyasreya merged commitcd890aa intomainOct 25, 2024
28 of 30 checks passed
@sreyasreya deleted the jon/glue branchOctober 25, 2024 16:14
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 25, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@spikecurtisspikecurtisspikecurtis approved these changes

Assignees

@sreyasreya

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

feat: automatic key rotation

2 participants

@sreya@spikecurtis

[8]ページ先頭

©2009-2025 Movatter.jp