Compare commits

...
Author SHA1 Message Date
Roman Perekhod 17204a337f fix: OCISDEV-967 2026-06-11 15:12:17 +02:00
6 changed files with 10 additions and 7 deletions

No files matched your search

+1 -1
View File
@@ -64,7 +64,7 @@ require (
github.com/open-policy-agent/opa v1.12.3
github.com/orcaman/concurrent-map v1.0.0
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
github.com/owncloud/reva/v2 v2.0.0-20260521135517-5cf6fa2c7dbf
github.com/owncloud/reva/v2 v2.0.0-20260611130633-a2630d5932c4
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.12
github.com/prometheus/client_golang v1.23.2
+2 -2
View File
@@ -737,8 +737,8 @@ github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HD
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245 h1:JRidLTAKhnvyLMRtVtSF4lhBa0NSAOs6fof+d6JnKII=
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245/go.mod h1:z61VMGAJRtR1nbgXWiNoCkxUXP1B3Je9rMuJbnGd+Og=
github.com/owncloud/reva/v2 v2.0.0-20260521135517-5cf6fa2c7dbf h1:VSRW0jZVcDrmwCwEoXZAIPQi3Agnes9uiNTdWGKjzKg=
github.com/owncloud/reva/v2 v2.0.0-20260521135517-5cf6fa2c7dbf/go.mod h1:oHjvB9PhfF8QqiNGz7Hd4AVvR7CSPx3CLVRxUzmjK0w=
github.com/owncloud/reva/v2 v2.0.0-20260611130633-a2630d5932c4 h1:fc0rwbPPYs83EZO9iAklZaZjXjdZ2nn/mmUgnP28u2U=
github.com/owncloud/reva/v2 v2.0.0-20260611130633-a2630d5932c4/go.mod h1:oHjvB9PhfF8QqiNGz7Hd4AVvR7CSPx3CLVRxUzmjK0w=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pablodz/inotifywaitgo v0.0.9 h1:njquRbBU7fuwIe5rEvtaniVBjwWzcpdUVptSgzFqZsw=
@@ -159,7 +159,7 @@ func NewUnary(m map[string]interface{}, unprotected []string, tp trace.TracerPro
ctx = ctxpkg.ContextSetScopes(ctx, tokenScope)
// TODO: MFA enforcement should be moved to the individual service level, so each service can
// decide which endpoints require MFA and which are accessible without it.
if conf.MFAEnabled {
if conf.MFAEnabled && u.Id.Type != userpb.UserType_USER_TYPE_SERVICE {
if mfav := metadata.ValueFromIncomingContext(ctx, ctxpkg.MFAOutgoingHeader); !slices.Contains(mfav, "true") {
log.Warn().Str("user_id", u.Id.OpaqueId).Strs("mfa_values", mfav).Msg("MFA is required")
return mfaResponse(ctx, req, info)
@@ -256,7 +256,7 @@ func NewStream(m map[string]interface{}, unprotected []string, tp trace.TracerPr
ctx = ctxpkg.ContextSetScopes(ctx, tokenScope)
// TODO: MFA enforcement should be moved to the individual service level, so each service can
// decide which endpoints require MFA and which are accessible without it.
if conf.MFAEnabled {
if conf.MFAEnabled && u.Id.Type != userpb.UserType_USER_TYPE_SERVICE {
if mfav := metadata.ValueFromIncomingContext(ctx, ctxpkg.MFAOutgoingHeader); !slices.Contains(mfav, "true") {
log.Warn().Str("user_id", u.Id.OpaqueId).Strs("mfa_values", mfav).Msg("MFA is required")
return status.Errorf(codes.PermissionDenied, "MFA required to access vault storage")
@@ -24,6 +24,7 @@ import (
"github.com/owncloud/reva/v2/internal/http/services/owncloud/ocs/config"
"github.com/owncloud/reva/v2/internal/http/services/owncloud/ocs/response"
"github.com/owncloud/reva/v2/pkg/owncloud/ocs"
"github.com/owncloud/reva/v2/pkg/utils"
)
// Handler renders the capability endpoint
@@ -260,5 +261,6 @@ func (h *Handler) vaultCapabilities(c ocs.CapabilitiesData) ocs.CapabilitiesData
caps := *c.Capabilities
caps.FilesSharing = &sharing
c.Capabilities = &caps
c.Capabilities.Vault.VaultStorageProvider = utils.VaultStorageProviderID
return c
}
+2 -1
View File
@@ -337,5 +337,6 @@ type Version struct {
// CapabilitiesVault holds vault capabilities
type CapabilitiesVault struct {
Enabled ocsBool `json:"enabled" xml:"enabled" mapstructure:"enabled"`
Enabled ocsBool `json:"enabled" xml:"enabled" mapstructure:"enabled"`
VaultStorageProvider string `json:"vault_storage_provider" xml:"vault_storage_provider" mapstructure:"vault_storage_provider"`
}
+1 -1
View File
@@ -1319,7 +1319,7 @@ github.com/orcaman/concurrent-map
# github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
## explicit; go 1.18
github.com/owncloud/libre-graph-api-go
# github.com/owncloud/reva/v2 v2.0.0-20260521135517-5cf6fa2c7dbf
# github.com/owncloud/reva/v2 v2.0.0-20260611130633-a2630d5932c4
## explicit; go 1.25.7
github.com/owncloud/reva/v2/cmd/revad/internal/grace
github.com/owncloud/reva/v2/cmd/revad/runtime