-
Notifications
You must be signed in to change notification settings - Fork 240
[full-ci] feat: ocisdev-533 graph #12108
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
2403905
wants to merge
11
commits into
master
Choose a base branch
from
feat/OCISDEV-533-graph
base: master
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 all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
efa2a8c
update gitignore
2403905 f017280
feat: Separate the storage-users and graph to handle
2403905 5cde110
feat: move the space create cache
2403905 2e3d120
configurate the vault srorage Postprocessing
2403905 b136054
hide the assignment of the MountID to VaultStorageProviderID behind a…
2403905 5f42325
configurate the proxy to create the vault home space
2403905 e154836
update the filter
2403905 e420614
Make the graph able to handle vault prefix. no extra service needed
2403905 2fec851
apply the vault filter to sharedbyme and sharedwithme
2403905 ad271bf
added vault-storage docker
2403905 dddd84e
use squashed reva
2403905 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 |
|---|---|---|
|
|
@@ -57,6 +57,7 @@ protogen/buf.sha1.lock | |
| /third-party-licenses | ||
|
|
||
| # misc | ||
| .agents/ | ||
| /tmp | ||
| go.work | ||
| go.work.sum | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| services: | ||
| ocis: | ||
| environment: | ||
| OCIS_MFA_ENABLED: true | ||
| NATS_NATS_HOST: 0.0.0.0 | ||
| SETTINGS_GRPC_ADDR: ocis:9191 | ||
| PROXY_CREATE_VAULT_HOME: true | ||
| GRAPH_ENABLE_VAULT_MODE: true | ||
|
|
||
| storage-users-vault: | ||
| image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest} | ||
| networks: | ||
| ocis-net: | ||
| depends_on: | ||
| ocis: | ||
| condition: service_started | ||
| command: ["storage-users", "server"] | ||
| environment: | ||
| OCIS_LOG_LEVEL: debug | ||
| OCIS_GATEWAY_GRPC_ADDR: ocis:9142 | ||
| STORAGE_USERS_ENABLE_VAULT_MODE: true | ||
| STORAGE_USERS_SERVICE_NAME: storage-users-vault | ||
| STORAGE_USERS_GRPC_ADDR: storage-users-vault:9170 | ||
| STORAGE_USERS_HTTP_ADDR: storage-users-vault:9168 | ||
| STORAGE_USERS_DATA_SERVER_URL: http://storage-users-vault:9168/data | ||
| STORAGE_USERS_DEBUG_ADDR: storage-users-vault:9169 | ||
| STORAGE_USERS_OCIS_ROOT: /var/lib/ocis/storage/users-vault | ||
| STORAGE_USERS_EVENTS_CONSUMER_GROUP: vault-dcfs | ||
| MICRO_REGISTRY_ADDRESS: ocis:9233 | ||
| OCIS_EVENTS_ENDPOINT: ocis:9233 | ||
| OCIS_CACHE_STORE_NODES: ocis:9233 | ||
| volumes: | ||
| - ocis-data:/var/lib/ocis | ||
| - ocis-config:/etc/ocis | ||
| logging: | ||
| driver: ${LOG_DRIVER:-local} | ||
| restart: always |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package middleware | ||
|
|
||
| import ( | ||
| "net/http" | ||
|
|
||
| "github.com/owncloud/ocis/v2/ocis-pkg/log" | ||
| "github.com/owncloud/ocis/v2/ocis-pkg/mfa" | ||
| ) | ||
|
|
||
| // RequireMFA middleware is used to require the user in context to have MFA satisfied | ||
| func RequireMFA(logger log.Logger) func(next http.Handler) http.Handler { | ||
| return func(next http.Handler) http.Handler { | ||
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
| if !mfa.Has(r.Context()) { | ||
| l := logger.SubloggerWithRequestID(r.Context()) | ||
| l.Error().Str("path", r.URL.Path).Msg("MFA required but not satisfied") | ||
| mfa.SetRequiredStatus(w) | ||
| return | ||
| } | ||
| next.ServeHTTP(w, r) | ||
| }) | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package middleware | ||
|
|
||
| import ( | ||
| "context" | ||
| "net/http" | ||
| ) | ||
|
|
||
| type key int | ||
|
|
||
| const vaultModeKey key = iota | ||
|
|
||
| func SetVaultMode(ctx context.Context, enabled bool) context.Context { | ||
| return context.WithValue(ctx, vaultModeKey, enabled) | ||
| } | ||
|
|
||
| func IsVaultMode(ctx context.Context) bool { | ||
| val, ok := ctx.Value(vaultModeKey).(bool) | ||
| return val && ok | ||
| } | ||
|
|
||
| func VaultModeMiddleware() func(next http.Handler) http.Handler { | ||
| return func(next http.Handler) http.Handler { | ||
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
| next.ServeHTTP(w, r.WithContext(SetVaultMode(r.Context(), true))) | ||
| }) | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.