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

Fix circular lookup when AS cert not found. #3197

Merged
merged 1 commit into from
Sep 30, 2019

Conversation

kormat
Copy link
Contributor

@kormat kormat commented Sep 27, 2019

Fixes #3194

This also changes the logic for determining if the trust store is
authoritative or not for a given query. The rules are:

  • A CS is authoritative for its own certs for its own AS.
  • A core CS is authoritative for all AS certs in the local ISD.
  • A core CS is authoritative for TRCs for the local ISD.

Also:

  • Make logging/errors a bit more consistent/useful in getChain.

This change is Reviewable

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @kormat)


go/lib/infra/modules/trust/trust.go, line 226 at r3 (raw file):

		// XXX(kormat): Wrap ErrMissingAuthoritative with ErrNotFoundLocally to
		// simplify logic in LoadAuthoritativeTRC
		return nil, serrors.Wrap(ErrNotFoundLocally,

Why not serrors.Wrap(ErrNotFoundLocally, ErrMissingAuthoritative, "isd"...) ?

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @kormat)


go/lib/infra/modules/trust/trust.go, line 226 at r3 (raw file):

Previously, Oncilla wrote…

Why not serrors.Wrap(ErrNotFoundLocally, ErrMissingAuthoritative, "isd"...) ?

Or rather the other way around: serrors.Wrap(ErrMissingAuthoritative, ErrNotFoundLocally, "isd"...)

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r4.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

This also changes the logic for determining if the trust store is
authoritative or not for a given query. The rules are:
- A CS is authoritative for certs for its own AS.
- A core CS is authoritative for all AS certs in the local ISD.
- A core CS is authoritative for TRCs for the local ISD.
- Any non-CS infra instance is required to have _a_ version of its own cert.

Also:
- Make logging/errors a bit more consistent/useful in getChain.
Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@kormat kormat merged commit bf506ed into scionproto:master Sep 30, 2019
@kormat kormat deleted the fix_truststore branch September 30, 2019 10:41
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.

TrustStore: Circular lookup
2 participants