Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registry configuration - security #6159

Merged
merged 3 commits into from
Feb 18, 2023

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented Feb 15, 2023

Implement new security configuration per registry publish proposal

@yim-lee
Copy link
Contributor Author

yim-lee commented Feb 15, 2023

@swift-ci please smoke test

@yim-lee
Copy link
Contributor Author

yim-lee commented Feb 16, 2023

@swift-ci please smoke test

@yim-lee
Copy link
Contributor Author

yim-lee commented Feb 16, 2023

@swift-ci please smoke test Windows

self.certificateRevocation = nil
}

mutating func merge(_ other: ValidationChecks) {
Copy link
Contributor

@tomerd tomerd Feb 17, 2023

Choose a reason for hiding this comment

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

this is more of an override than a merge? at least at the value level

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

case packageOverrides
}

public init(from decoder: Decoder) throws {
Copy link
Contributor

Choose a reason for hiding this comment

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

curios why we need the manual decoding?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It thinks packageOverrides is an array instead of a dictionary IIRC.

{
"registries": {},
"security": {
"packageOverrides": {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need a test that checks the various levels of overrides / merge behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what this test and others (e.g., testGetSigning_scopeOverride) do.

Copy link
Contributor

Choose a reason for hiding this comment

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

right. I was thinking a test that checks package override of scope, scope override of registry, and registry override of global all in the same config - ie stacked up on top of each other. maybe already covered and I missed it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

amended 5d4b3f0

Implement new `security` configuration per registry publish proposal
@yim-lee yim-lee force-pushed the registry-security-config branch from 8409a1a to 5d4b3f0 Compare February 17, 2023 08:53
@yim-lee
Copy link
Contributor Author

yim-lee commented Feb 17, 2023

@swift-ci please smoke test

@yim-lee
Copy link
Contributor Author

yim-lee commented Feb 17, 2023

@swift-ci please smoke test Windows

@yim-lee
Copy link
Contributor Author

yim-lee commented Feb 17, 2023

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented Feb 17, 2023

looks great 👍

@yim-lee yim-lee merged commit b741798 into swiftlang:main Feb 18, 2023
@yim-lee yim-lee deleted the registry-security-config branch February 18, 2023 00:39
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.

3 participants