Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834108 - net-libs/xrootd: Add support for tokens via dev-cpp/scitokens-cpp
Summary: net-libs/xrootd: Add support for tokens via dev-cpp/scitokens-cpp
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Physics related packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-02-26 19:10 UTC by Oliver Freyermuth
Modified: 2023-06-14 15:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Freyermuth 2022-02-26 19:10:19 UTC
XRootD supports the use of SciTokens and related tokens on client and server side via the SciTokens library. This also includes support for the ZTN protocol. 

In addition to enabling support via a CMake flag, two dependencies are needed:
* dev-cpp/scitokens-cpp, currently only packaged in Guru (dev queue as of now), 
* dev-cpp/jwt-cpp as dependency of scitokens-cpp (also in Guru). 

Reproducible: Always
Comment 2 Oliver Freyermuth 2023-06-09 07:33:12 UTC
Pinging @amadio, there is now dev-cpp/scitokens-cpp in portage proper, but it has a few issues which were already adressed in the now dropped GURU variant, still available at:

https://gitweb.gentoo.org/repo/proj/guru.git/tree/dev-cpp/scitokens-cpp/scitokens-cpp-1.0.1.ebuild?id=e3a9f5ef2abf6fe5599d64f4c3a384de958b1332

Namely, there seem to be compilation issues due to the picojson path, dev-cpp/jwt-cpp is bundled (was already unbundled in the GURU variant), and some tests which require network access are still enabled which will fail with portages network sandboxing enabled. 

Before opening separate issues on this, I wanted to ping you in case it helps to take a look at the version from Guru ;-).
Comment 3 Guilherme Amadio gentoo-dev 2023-06-09 08:00:04 UTC
Note that since v5.5.4, the using ZTN with the client does not require -DENABLE_SCITOKENS=1 anymore:

https://github.com/xrootd/xrootd/commit/d267b858a9d092fc484e0ca8534b8df120b7602e

(In reply to Oliver Freyermuth from comment #2)
> Pinging @amadio, there is now dev-cpp/scitokens-cpp in portage proper, but
> it has a few issues which were already adressed in the now dropped GURU
> variant, still available at:
> 
> https://gitweb.gentoo.org/repo/proj/guru.git/tree/dev-cpp/scitokens-cpp/
> scitokens-cpp-1.0.1.ebuild?id=e3a9f5ef2abf6fe5599d64f4c3a384de958b1332
> 
> Namely, there seem to be compilation issues due to the picojson path,
> dev-cpp/jwt-cpp is bundled (was already unbundled in the GURU variant), and
> some tests which require network access are still enabled which will fail
> with portages network sandboxing enabled. 
> 
> Before opening separate issues on this, I wanted to ping you in case it
> helps to take a look at the version from Guru ;-).

Indeed, I forgot about this bug, sorry about that. I decided to leave jwt-cpp bundled because it's header-only and there seemed to be little use for it out of being a dependency for scitokens-cpp. However, I would be happy to take the better ebuilds from GURU into portage. Maybe you could open a pull request with them? Thanks!
Comment 4 Larry the Git Cow gentoo-dev 2023-06-14 15:02:08 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8db26670baed5fe7df699b941f1317177d1ffced

commit 8db26670baed5fe7df699b941f1317177d1ffced
Author:     Oliver Freyermuth <o.freyermuth@googlemail.com>
AuthorDate: 2023-06-09 08:23:47 +0000
Commit:     Guilherme Amadio <amadio@gentoo.org>
CommitDate: 2023-06-14 14:59:54 +0000

    dev-cpp/scitokens-cpp: unbundle dev-cpp/jwt-cpp, enable tests
    
    This enables tests, unbundles dev-cpp/jwt-cpp, and adds myself as proxied maintainer.
    
    Bug: https://bugs.gentoo.org/834108
    Closes: https://github.com/gentoo/gentoo/pull/31364
    Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
    Signed-off-by: Guilherme Amadio <amadio@gentoo.org>

 dev-cpp/scitokens-cpp/metadata.xml                 |  8 +++
 .../scitokens-cpp/scitokens-cpp-1.0.1-r1.ebuild    | 57 ++++++++++++++++++++++
 2 files changed, 65 insertions(+)
Comment 5 Guilherme Amadio gentoo-dev 2023-06-14 15:05:18 UTC
Thanks, Oliver!