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

add public share auth middleware #2536

Merged
merged 5 commits into from
Oct 18, 2021
Merged

Conversation

C0rby
Copy link
Contributor

@C0rby C0rby commented Sep 23, 2021

Description

Added a new middleware which authenticates public share requests. I.e. it gets the x-access-token by authenticating via the share token and optionally the share password.

To test this you need to use this patched reva version: https://github.com/C0rby/reva/tree/public-share-app-auth

Related Issue

Motivation and Context

Some APIs like the appprovider need an authenticated context to be able to load files from the storage. With this middleware the appprovider doesn't need to learn about public links and instead can offer one way to open files in apps.

How Has This Been Tested?

  • with a local setup using collabora

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

David Christofas added 2 commits October 15, 2021 16:48
The x-access-token for public shares is scoped for only the share. That means create home would fail because the token is not valid.
@C0rby C0rby force-pushed the public-share-auth-middleware branch from 73f8967 to c74e125 Compare October 15, 2021 15:27
@C0rby C0rby marked this pull request as ready for review October 15, 2021 15:27
@C0rby C0rby force-pushed the public-share-auth-middleware branch from c74e125 to f5aabe1 Compare October 15, 2021 15:45
@sonarcloud
Copy link

sonarcloud bot commented Oct 15, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@wkloucek wkloucek left a comment

Choose a reason for hiding this comment

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

LGTM

@wkloucek wkloucek merged commit 8fdf8e3 into master Oct 18, 2021
@delete-merged-branch delete-merged-branch bot deleted the public-share-auth-middleware branch October 18, 2021 05:54
ownclouders pushed a commit that referenced this pull request Oct 18, 2021
Merge: 32fb7cb f5aabe1
Author: Willy Kloucek <[email protected]>
Date:   Mon Oct 18 07:54:11 2021 +0200

    Merge pull request #2536 from owncloud/public-share-auth-middleware

    add public share auth middleware
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.

2 participants