-
Notifications
You must be signed in to change notification settings - Fork 19
start refactoring creds behaviour for address #849
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
Open
paulo-ocean
wants to merge
26
commits into
main
Choose a base branch
from
issue-810-creds-address-behaviour
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 16 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
969918f
start refactoring creds behaviour for address
paulo-ocean 2d638fd
more refactor
paulo-ocean 2c23a9b
change default behaviour
paulo-ocean e9f98d5
change default behaviour, add unti test
paulo-ocean 97f56a0
fix unit test
paulo-ocean 8631883
fix unit test
paulo-ocean 3836ce3
fix unit test
paulo-ocean e9db2c4
fix unit test
paulo-ocean 56e7953
update asset credentials
paulo-ocean ae79d68
try debug it
paulo-ocean edbdd12
fix service levels credentials on asset
paulo-ocean af5b509
clean debug console.log
paulo-ocean 02bfa35
Merge branch 'main' into issue-810-creds-address-behaviour
paulo-ocean a4498fc
add new types and match all/any rules
paulo-ocean 01e249a
add new types and match all/any rules
paulo-ocean ed62637
extend check to match rules any or all
paulo-ocean c808dde
Merge branch 'main' into issue-810-creds-address-behaviour
paulo-ocean f1b87b6
add support for accessList on download checkCredentials
paulo-ocean 329fb95
fix tests, async call
paulo-ocean d8972e0
Merge branch 'main' into issue-810-creds-address-behaviour
paulo-ocean 263bf4a
Merge branch 'main' into issue-810-creds-address-behaviour
paulo-ocean 4136d96
Merge pull request #873 from oceanprotocol/issue-871-checkCredentials…
paulo-ocean aaeb4d4
Merge branch 'main' into issue-810-creds-address-behaviour
giurgiur99 b9b5d77
use latest ddo-js
giurgiur99 0de2b5c
refactor match credentials
giurgiur99 fcf6830
Merge branch 'main' into issue-810-creds-address-behaviour
giurgiur99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,21 @@ | ||
| // we will have more (user defined) | ||
| export const KNOWN_CREDENTIALS_TYPES = ['address', 'accessList'] | ||
| export const KNOWN_CREDENTIALS_TYPES = ['address', 'accessList'] // the ones we handle | ||
|
|
||
| export const CREDENTIAL_TYPES = { | ||
| ADDRESS: KNOWN_CREDENTIALS_TYPES[0], | ||
| ACCESS_LIST: KNOWN_CREDENTIALS_TYPES[1], | ||
| POLICY_SERVER_SPECIFIC: 'PS-specific Type' // externally handled by Policy Server | ||
| } | ||
| export interface Credential { | ||
| type?: string | ||
| values?: string[] | ||
| } | ||
|
|
||
| export type MATCH_RULES = 'any' | 'all' | ||
|
|
||
| export interface Credentials { | ||
| match_allow?: MATCH_RULES // any => it's enough to have one rule matched, all => all allow rules should match, default: 'all' | ||
| match_deny?: MATCH_RULES // same pattern as above, default is 'any' | ||
| allow?: Credential[] | ||
| deny?: Credential[] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm kind of surprised that we agreed to implement this change. So the default behaviour is that if an asset published, no one can access it? Seems contrary to our mission statement 🤔
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's copied from the specs yes #804 #810 OceanProtocolEnterprise#25
makes perfectly sense to me for security reasons.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to enterprise users... In the past Ocean has always taken the approach that everything is open by default and Enterprises must take extra steps if they don't like the default. So this is a fundamental shift in that approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not gonna discuss that... please check with @alexcos20 . I just followed the specs and they make sense to me
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything changing if we have a discussion, you may as well just go ahead. Nothing wrong with the implementation