All Projects → martinspielmann → nexus3-crowd-plugin

martinspielmann / nexus3-crowd-plugin

Licence: Apache-2.0 license
Sonatype Nexus plugin for Atlassian Crowd integration

Projects that are alternatives of or similar to nexus3-crowd-plugin

nexus-blobstore-s3
[*No longer maintained*] Nexus Repository S3 Blobstores
Stars: ✭ 59 (+78.79%)
Mutual labels:  sonatype-nexus, nexus-repository, sonatype
nexus-repository-conan
Conan the Barbarian, C packaging, fun times
Stars: ✭ 37 (+12.12%)
Mutual labels:  sonatype-nexus, nexus-repository, sonatype
terraform-provider-nexus
Terraform provider for Sonatype Nexus
Stars: ✭ 74 (+124.24%)
Mutual labels:  sonatype-nexus, sonatype
nexus-repository-import-scripts
A few scripts for importing artifacts into Nexus Repository
Stars: ✭ 142 (+330.3%)
Mutual labels:  nexus-repository
ChangTu
🗺 This is a service class application software that for the poor areas which have bad traffic safety,the crowd which have lower safety awareness and the people which go out to an unfamiliar place.
Stars: ✭ 15 (-54.55%)
Mutual labels:  crowd
ods-jenkins-shared-library
Shared Jenkins library which all ODS projects & components use - provisioning, SonarQube code scanning, Nexus publishing, OpenShift template based deployments and repository orchestration
Stars: ✭ 51 (+54.55%)
Mutual labels:  nexus-repository
n3dr
Nexus3 Disaster Recovery (N3DR) is a tool that is capable of downloading all artifacts from a Nexus3 server and to migrate them to another Nexus3 server. Note that some repository formats are not supported at the moment.
Stars: ✭ 110 (+233.33%)
Mutual labels:  nexus3
nexus-repository-cargo
Nexus Repository Cargo Format
Stars: ✭ 33 (+0%)
Mutual labels:  nexus3
maven-artifacts-uploader
command line tool for uploading directory of maven artifacts to nexus 3.x repository
Stars: ✭ 30 (-9.09%)
Mutual labels:  nexus-repository
ck-clsmith
Collective Knowledge extension to crowdsource bug detection in OpenCL compilers using CLSmith tool from Imperial College London
Stars: ✭ 26 (-21.21%)
Mutual labels:  crowd
virgo
Crowdsourced fuzzing cluster. 🚀
Stars: ✭ 21 (-36.36%)
Mutual labels:  crowd
eryajf.github.io
📝 大千世界,何其茫茫。谨此笔记,记录过往。凭君阅览,小站洛荒。如能收益,莫大奢望
Stars: ✭ 159 (+381.82%)
Mutual labels:  nexus3
nexus-platform-plugin
Nexus Platform Plugin for Jenkins
Stars: ✭ 25 (-24.24%)
Mutual labels:  nexus-repository
CrowdLayer
A neural network layer that enables training of deep neural networks directly from crowdsourced labels (e.g. from Amazon Mechanical Turk) or, more generally, labels from multiple annotators with different biases and levels of expertise.
Stars: ✭ 45 (+36.36%)
Mutual labels:  crowd
Crowd Behavior Analysis
Crowd behavior analysis is an important field of research in modern world. It has wide applications in surveillance and public safety which are one of the prime social concerns. One way to analyze crowd behavior is obtain crowd movement data and then find out outliers in the individual trajectories to infer any abnormal behavior in the crowd.
Stars: ✭ 31 (-6.06%)
Mutual labels:  crowd
data-center-helm-charts
Helm charts for Atlassian's Data Center products
Stars: ✭ 77 (+133.33%)
Mutual labels:  crowd
crowd.hyoo.ru
CROWD - Delta based CRDT with additional abilities.
Stars: ✭ 59 (+78.79%)
Mutual labels:  crowd
traj-pred-irl
Official implementation codes of "Regularizing neural networks for future trajectory prediction via IRL framework"
Stars: ✭ 23 (-30.3%)
Mutual labels:  crowd
chef-nexus-repository-manager
Chef recipes for Nexus Repository Manager
Stars: ✭ 39 (+18.18%)
Mutual labels:  nexus-repository
sonatype-publish-plugin
Gradle Plugin for publishing artifacts to Sonatype and Nexus
Stars: ✭ 17 (-48.48%)
Mutual labels:  sonatype

Nexus3 Crowd Plugin

This plugin adds a Crowd realm to Sonatype Nexus OSS and enables you to authenticate with Crowd Users and authorize with crowd roles.

It works with Nexus 3.x and Crowd 2.x and 3.x

Java CI License SonarQube Coverage

Directory naming convention:

When Nexus gets downloaded and unzipped, there are typically two directories created:

  • nexus-3.23.0-03
  • sonatype-work/nexus3

To avoid confusion, the conventions of the Sonatype reference will be used in the following descriptions:

  • nexus-3.23.0-03 will be referred to as $install-dir
  • sonatype-work/nexus3 will be referred to as $data-dir

See https://books.sonatype.com/nexus-book/reference3/install.html#directories for reference.

Installation

Test installation with docker

1. Use the following Dockerfile

FROM sonatype/nexus3

USER root

# Install curl
RUN yum install -y curl

# Download crowd plugin
RUN curl -L https://github.com/martinspielmann/nexus3-crowd-plugin/releases/download/nexus3-crowd-plugin-3.8.2/nexus3-crowd-plugin-3.8.2.jar --output /opt/sonatype/nexus/system/nexus3-crowd-plugin.jar

# Install plugin
RUN echo "reference\:file\:nexus3-crowd-plugin.jar = 200" >> /opt/sonatype/nexus/etc/karaf/startup.properties

# Add Crowd Config
RUN touch /opt/sonatype/nexus/etc/crowd.properties
RUN echo "crowd.server.url=https://jira.example.com" >> /opt/sonatype/nexus/etc/crowd.properties
RUN echo "application.name=nexus" >> /opt/sonatype/nexus/etc/crowd.properties
RUN echo "application.password=nexus" >> /opt/sonatype/nexus/etc/crowd.properties
RUN echo "cache.authentication=false" >> /opt/sonatype/nexus/etc/crowd.properties

# setup permissions
RUN chown nexus:nexus -R /opt/sonatype/nexus

USER nexus

2. Run in Terminal

docker build -t test .
docker run --rm -ti test

Easiest Install

Thanks to some upstream work in Nexus Repository (versions newer than 3.15), it's become a LOT easier to install a plugin. To install this format plugin, you can either build locally or download from github

More information on Sonatype website: https://help.sonatype.com/repomanager3/bundle-development/installing-bundles

Prerequisites

  • JDK 8 is installed
  • Sonatype Nexus OSS > 3.15 is installed

1. Download latest release (since plugin 3.8.2) kar into nexus $install-dir/deploy folder

Releases can be found here: https://github.com/martinspielmann/nexus3-crowd-plugin/releases

cd $install-dir/deploy/
wget https://github.com/martinspielmann/nexus3-crowd-plugin/releases/download/nexus3-crowd-plugin-3.8.2/nexus3-crowd-plugin-3.8.2-SNAPSHOT-bundle.kar

2. Create crowd.properties

Create a crowd.properties file in $install-dir/etc
The file has to contain the following properties:

crowd.server.url=http://localhost:8095/crowd (replace by your crowd url)
application.name=nexus (replace by your nexus application name configured in crowd)
application.password=nexus (replace by your nexus application password configured in crowd)
cache.authentication=false (should authentication be cached? default is false)

# optional:
timeout.connect=15000 (default is 15000)
timeout.socket=15000 (default is 15000)
timeout.connectionrequest=15000 (default is 15000)

3. Restart Nexus Repo

Other Install

Prerequisites

  • JDK 8 is installed
  • Sonatype Nexus OSS 3.x is installed

1. Download latest release jar into nexus system folder

Releases can be found here: https://github.com/martinspielmann/nexus3-crowd-plugin/releases

cd $install-dir/system/
wget https://github.com/martinspielmann/nexus3-crowd-plugin/releases/download/nexus3-crowd-plugin-3.8.2/nexus3-crowd-plugin-3.8.2.jar

2. Add bundle to startup properties

Append the following line to startup.properties file found in $install-dir/etc/karaf

reference\:file\:nexus3-crowd-plugin-3.8.2.jar = 200

3. Create crowd.properties

Create a crowd.properties file in $install-dir/etc
The file has to contain the following properties:

crowd.server.url=http://localhost:8095/crowd (replace by your crowd url)
application.name=nexus (replace by your nexus application name configured in crowd)
application.password=nexus (replace by your nexus application password configured in crowd)
cache.authentication=false (should authentication be cached? default is false)

# optional:
timeout.connect=15000 (default is 15000)
timeout.socket=15000 (default is 15000)
timeout.connectionrequest=15000 (default is 15000)

Usage

1. Activate Plugin

After installation you have to activate the plugin in the administration frontend. You have to login with an administrative nexus account to do so. The default admin credentials are

  • username: admin
  • password: admin123 (don't forget to change it!)

After login you can navigate to the realm administration. Activate the plugin by dragging it to the right hand side:

2. Map Crowd Groups to Nexus Roles

As a last step you have to map your crowd groups to nexus internal roles. A good starting point is mapping one crowd group to nx-admin role, so you can start managing Nexus with your Crowd Login.

  • Choose a crowd group
  • Think up a new unique name for the mapped role
  • Add nx-admin to the contained roles

That's it. You should no be able to logout and login with your Crowd user (provided that your Crowd user is in one of you previously mapped groups).

Remark: Caching can improve authentication performance significantly by moving credential validation into memory instead of requesting it from the crowd server every time. However if cache.authentication is set to true, a hashed version of user credentials will be cached. This might be a security risk and is also the reason why this property defaults to false.

Development

1.Build the plugin

Build and install the into your local maven repository using the following commands:

git clone https://github.com/martinspielmann/nexus3-crowd-plugin.git
cd nexus3-crowd-plugin
mvn install

In order to build the bundle (kar)

mvn clean package -PbuildKar

2. Start nexus with console

Move into your $install-dir. Edit the file bin/nexus.vmoptions to contain the following line

-Dkaraf.startLocalConsole=true

After that (re-)start nexus. It will then startup with an interactive console enabled. (If the console doesn't show up, you may hit the Enter key after startup). Your console should look like this afterwards:

karaf@root()> 

3. Install plugin bundle

Within the console just type

bundle:install -s file://ABSOLUTE_PATH_TO_YOUR_JAR

Contributing

GitHub contributors

Thanks to all contributors who helped to get this up and running

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].