Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasvan committed Dec 4, 2018
0 parents commit e223d14
Show file tree
Hide file tree
Showing 22 changed files with 974 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
87 changes: 87 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Created by https://www.gitignore.io/api/intellij
# Edit at https://www.gitignore.io/?templates=intellij

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/sonarlint

# End of https://www.gitignore.io/api/intellij

/target/
/classes/
/amps-standalone-*/
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/artifacts/httpheader_jar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
To avoid future confusion, we recommend that you include a license with your plugin.
This file is simply a reminder.

For a template license you can have a look at: http://www.opensource.org/licenses/

Atlassian releases most of its modules under the Apache2 license: http://opensource.org/licenses/Apache-2.0
49 changes: 49 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# jira-httpheader-auth

HTTP Headers authentication plugin.

## Summary
Will allow authenticated access to JIRA for http requests with the following (hardcoded) header:
* `X-Forwarded-Login` (the username of a valid JIRA user)

This might be useful when JIRA instances are hosted behind a reverse-proxy which is responsible for authentication.

## Installation

* Deploy httpheader-<version>.jar to `${jira_base}/atlassian-jira/WEB-INF/lib`
* Use `<authenticator class="com.redgate.jira.auth.httpheader.HttpHeaderAuthenticator"/>` in `${jira_base}/atlassian-jira/WEB-INF/classes/seraph-config.xml`

## Development

### Prerequisites

* JDK 1.8
* Maven
* Atlassian SDK (to start a local jira instance)

### Build & Test

The .jar file can be build by `mvn package`. The .jar file will be available in `target/`

```
# How to quickly start a local jira instance.
atlas-run-standalone --product jira --version 7.12.0
# local jira instance is available at http://localhost:2990/jira/
# build the jar file
mvn package
# deploy it to the local jira instance
cp ./target/httpheader-1.0.0-SNAPSHOT.jar ./amps-standalone-jira-7.12.0/target/jira/webapp/WEB-INF/lib/
# update seraph-config to use our custom authenticator
# in amps-standalone-jira-7.12.0/target/jira/webapp/WEB-INF/classes/seraph-config.xml
# set <authenticator class="com.redgate.jira.auth.httpheader.HttpHeaderAuthenticator"/>
# restart jira
```

## Release a new version

* Update `<version>` in `pom.xml`
* `mvn package`
* Create tag and upload jar to https://github.com/red-gate/jira-httpheader-auth/releases
Loading

0 comments on commit e223d14

Please sign in to comment.