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

feat: Implement SQL Identity Hub Store #43

Merged

Conversation

bscholtes1A
Copy link
Contributor

@bscholtes1A bscholtes1A commented Oct 19, 2022

What this PR changes/adds

Provides SQL implementation of IdentityHubStore.

Why it does that

Ensuring persistence of items put in the store.

Further notes

Linked Issue(s)

Closes #38.

Checklist

  • added appropriate tests?
  • performed checkstyle check locally?
  • added/updated copyright headers?
  • documented public classes/methods?
  • added/updated relevant documentation?
  • added relevant details to the changelog? (skip with label no-changelog)
  • formatted title correctly? (take a look at the CONTRIBUTING and styleguide for details)

@bscholtes1A bscholtes1A force-pushed the feature/38-sql_identity_hub_store branch from c4dd8e5 to 00f4b68 Compare October 19, 2022 13:38
@bscholtes1A bscholtes1A changed the title Implement SQL Identity Hub Store feature: Implement SQL Identity Hub Store Oct 19, 2022
@bscholtes1A bscholtes1A requested a review from wolf4ood October 19, 2022 13:39
@bscholtes1A bscholtes1A changed the title feature: Implement SQL Identity Hub Store feat: Implement SQL Identity Hub Store Oct 19, 2022
@bscholtes1A bscholtes1A marked this pull request as ready for review October 19, 2022 13:40
@bscholtes1A bscholtes1A force-pushed the feature/38-sql_identity_hub_store branch from a258d39 to f635e7d Compare October 26, 2022 08:53
@@ -151,6 +152,8 @@ private RequestObject createRequestObject(String method, byte[] data) {
.descriptor(Descriptor.Builder.newInstance()
.method(method)
.nonce(NONCE)
.recordId(UUID.randomUUID().toString())
.dateCreated(Instant.now().getEpochSecond())
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be millis or is there a specific reason why this is the epoch date?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I understand from the Decentralized Identity Foundation it should be epoch seconds: https://identity.foundation/decentralized-web-node/spec/0.0.1-predraft/#write

The object MUST contain a dateCreated property, and its value MUST be an Unix epoch timestamp that MUST be set and interpreted as the time the logical entry was created by the DID owner or another permitted party.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK thx

@jimmarino
Copy link
Contributor

@bscholtes1A Paul is out, so I took a look. I had one small comment - do you want to review that and also fix the conflicts so we can merge?

@bscholtes1A bscholtes1A force-pushed the feature/38-sql_identity_hub_store branch from f635e7d to 847cac9 Compare October 27, 2022 14:25
@bscholtes1A
Copy link
Contributor Author

@bscholtes1A Paul is out, so I took a look. I had one small comment - do you want to review that and also fix the conflicts so we can merge?

Answered and conflict fixed.

@jimmarino
Copy link
Contributor

@bscholtes1A do you want to merge?

@bscholtes1A bscholtes1A merged commit 1fdd5ce into eclipse-edc:main Oct 27, 2022
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.

Persistent IdentityHubStore - PostgreSQL extension
4 participants