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

NOISSUE - Add SANs option #27

Merged
merged 9 commits into from
Oct 14, 2024
Merged

NOISSUE - Add SANs option #27

merged 9 commits into from
Oct 14, 2024

Conversation

nyagamunene
Copy link
Contributor

@nyagamunene nyagamunene commented Oct 14, 2024

What type of PR is this?

This is a feature because it adds SANs option.

What does this do?

It adds SANs option for root and intermediate CA.

Which issue(s) does this PR fix/relate to?

N/A

Have you included tests for your changes?

N/A

Did you document any new/modified features?

N/A

Notes

Signed-off-by: nyagamunene <[email protected]>
@nyagamunene nyagamunene marked this pull request as ready for review October 14, 2024 09:04
service.go Outdated
Comment on lines 46 to 47
net.ParseIP("192.168.100.4"),
net.ParseIP("164.90.178.85"),

Choose a reason for hiding this comment

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

make this dynamic

Copy link
Contributor

Choose a reason for hiding this comment

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

Load both DNS names and IP addresses from the config, we can't have it hardcoded like this.

Signed-off-by: nyagamunene <[email protected]>
organizational_unit:
- "AbstractMachines_ca"
country:
- "Sirbea"
Copy link
Contributor

Choose a reason for hiding this comment

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

Sirbea is not a country, and it should be France.

service.go Outdated
Comment on lines 143 to 146
config, err := LoadConfig(configFile)
if err != nil {
return &svc, err
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Load config in the main.go and use it as a param in NewService.

Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
service.go Show resolved Hide resolved
service.go Outdated
@@ -756,3 +774,13 @@ func (s *service) loadCACerts(ctx context.Context) error {
}
return nil
}

func parseIPs(ipStrings []string) []net.IP {
Copy link
Contributor

Choose a reason for hiding this comment

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

Extract config and config handling to a separate file. Make config IP list net.IP instead of strings and parse during config creation.

Signed-off-by: nyagamunene <[email protected]>
dns_names:
- "localhost"
ip_addresses:
- "192.168.100.4"

Choose a reason for hiding this comment

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

Suggested change
- "192.168.100.4"
- "localhost"

- "localhost"
ip_addresses:
- "192.168.100.4"
- "164.90.178.85"

Choose a reason for hiding this comment

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

belongs to prism, don't set in this config, but rather create a config file on prism side

Signed-off-by: nyagamunene <[email protected]>
Comment on lines 11 to 18
province:
- "Sirbea"
locality:
- "Sirbea"
street_address:
- "Sirbea"
postal_code:
- "Sirbea"

Choose a reason for hiding this comment

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

Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
@dborovcanin dborovcanin merged commit 3f118b8 into absmach:main Oct 14, 2024
3 checks passed
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