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(cloud): add shared-instance flag in limit superflag in alpha #7770

Merged
merged 12 commits into from
May 5, 2021

Conversation

NamanJain8
Copy link
Contributor

@NamanJain8 NamanJain8 commented Apr 30, 2021

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

  • Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
  • Prevent the leaking of environment variables for minio and aws.

This change is Reviewable

@NamanJain8 NamanJain8 marked this pull request as ready for review May 3, 2021 11:15
Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

The PR looks good to me but we need tests. @NamanJain8 create a docker compose file with the cloud flag and then try to run login/create user, etc on that dgraph cluster.

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

some early comments. Haven't looked at the rest of the PR yet.

Reviewable status: 0 of 13 files reviewed, 4 unresolved discussions (waiting on @NamanJain8 and @vvbalaji-dgraph)


dgraph/cmd/alpha/run.go, line 262 at r4 (raw file):

		String())

	flag.String("cloud", worker.CloudDefaults, z.NewSuperFlagHelp(worker.CloudDefaults).

how about put this in the "limit" flag?


dgraph/cmd/alpha/run.go, line 264 at r4 (raw file):

	flag.String("cloud", worker.CloudDefaults, z.NewSuperFlagHelp(worker.CloudDefaults).
		Head("Dgraph cloud options").
		Flag("disable-non-galaxy",

probably don't need this. Unless you think the cloud flag would grow to many options. I reckon it's just for "shared-instance" users of the cloud.

So, perhaps limit=shared-instance=true, which would then automatically disable a bunch of things.


testutil/multi_tenancy.go, line 347 at r4 (raw file):

func Export(t *testing.T, token *HttpToken, dest, accessKey, secretKey string) *GraphQLResponse {
	exportRequest := `mutation export($dst: String!, $f: String!, $access: String!, $secret: String!){

100 chars.

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

Get @ahsanbarkati's review as well.

@NamanJain8 NamanJain8 requested a review from manishrjain May 5, 2021 07:32
Copy link
Contributor Author

@NamanJain8 NamanJain8 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: 0 of 14 files reviewed, 3 unresolved discussions (waiting on @manishrjain and @vvbalaji-dgraph)


dgraph/cmd/alpha/run.go, line 262 at r4 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

how about put this in the "limit" flag?

Done.


dgraph/cmd/alpha/run.go, line 264 at r4 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

probably don't need this. Unless you think the cloud flag would grow to many options. I reckon it's just for "shared-instance" users of the cloud.

So, perhaps limit=shared-instance=true, which would then automatically disable a bunch of things.

Done.


testutil/multi_tenancy.go, line 347 at r4 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

100 chars.

Done.

@NamanJain8 NamanJain8 dismissed manishrjain’s stale review May 5, 2021 07:37

I have addressed the above comments.

@NamanJain8 NamanJain8 changed the title feat(cloud): add cloud mode flag in alpha to disable ACL for non-GoG feat(cloud): add cloud mode flag in alpha May 5, 2021
@NamanJain8 NamanJain8 changed the title feat(cloud): add cloud mode flag in alpha feat(cloud): add shared-instance flag in limit superflag in alpha May 5, 2021
@NamanJain8 NamanJain8 merged commit 5f3cece into master May 5, 2021
@NamanJain8 NamanJain8 deleted the naman/cloud-mode branch May 5, 2021 08:00
NamanJain8 added a commit that referenced this pull request May 5, 2021
)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
NamanJain8 added a commit that referenced this pull request May 5, 2021
) (#7778)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
all-seeing-code pushed a commit that referenced this pull request Dec 13, 2022
) (#7778)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
(cherry picked from commit eeb7bea)
all-seeing-code pushed a commit that referenced this pull request Jan 2, 2023
) (#7778)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
(cherry picked from commit eeb7bea)
all-seeing-code pushed a commit that referenced this pull request Jan 4, 2023
) (#7778)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
(cherry picked from commit eeb7bea)
(cherry picked from commit ed657d5)
all-seeing-code pushed a commit that referenced this pull request Jan 23, 2023
) (#7778)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
(cherry picked from commit eeb7bea)
(cherry picked from commit ed657d5)
all-seeing-code pushed a commit that referenced this pull request Jan 23, 2023
)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
all-seeing-code added a commit that referenced this pull request Feb 8, 2023
)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
all-seeing-code added a commit that referenced this pull request Feb 8, 2023
author Anurag <[email protected]> 1620201646 +0530
committer Anurag <[email protected]> 1675852162 +0530

parent d3bf7b7
author Anurag <[email protected]> 1620201646 +0530
committer Anurag <[email protected]> 1675851671 +0530

feat(cloud): add shared-instance flag in limit superflag in alpha (#7770)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login, add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
all-seeing-code added a commit that referenced this pull request Feb 8, 2023
) (#8625)

This PR adds a shared-instance flag to --limit superflag.
When set to true (false by default), it will:

- Restrict access to any of the ACL operations like Login,
add/remove/update user from non-galaxy namespaces.
- Prevent the leaking of environment variables for minio and aws.

(cherry picked from commit 5f3cece)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants