Skip to content

Refapp 1299 multiple ssas v2#6

Open
ghost wants to merge 4 commits into
developfrom
REFAPP-1299-multiple_SSAsv2
Open

Refapp 1299 multiple ssas v2#6
ghost wants to merge 4 commits into
developfrom
REFAPP-1299-multiple_SSAsv2

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 24, 2022

No description provided.

@ghost ghost requested a review from kbendyk June 24, 2022 12:45
Copy link
Copy Markdown
Contributor

@kbendyk kbendyk left a comment

Choose a reason for hiding this comment

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

let's discuss on monday.


// UpdateSSA - update the main ssa of the AuthoriserBuilder by popping the first one from ssas
func (b *AuthoriserBuilder) UpdateSSA() error {
if len(b.ssas) == 0 && b.ssasPresence { // return error if there is not enogh SSAs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. ssaPresence - rename to ssaPresent or isSsaPresent after checking current convention
  2. Looks like ssaPresence flag is alway required, rewrite to make it obvious - exit early
  3. enogh - typo

// CheckMissingSSAs - Check if b.missingSSAs was updated (default = 0)
func (b AuthoriserBuilder) CheckMissingSSAs() error {
if b.missingSSAs > 0 {
return errors.New(fmt.Sprintf("invalid amout of SSAs provided in the config - missing: %d", b.missingSSAs))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo

Comment thread pkg/compliant/dcr32_config.go Outdated
WithTransportCertSubjectDn(transportCertSubjectDn)
WithTransportCertSubjectDn(transportCertSubjectDn).
WithSSAs(ssas).
WithSSAsPresence(SSAsPresents)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please explain why this method is necessary.

Copy link
Copy Markdown
Author

@ghost ghost Jun 27, 2022

Choose a reason for hiding this comment

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

This method is used to detect if multiple or single SSA was set in the config file. The information is stored under ssasPresence field and it is used to decide if SSAs mechanism is required.
Potentially it might be moved to WithSSAs method while SSAs slice is set.

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