Skip to content
Permalink
Browse files
Merge pull request #6 from jenkinsci/jenkins-36432-followup
[JENKINS-36432 followup] Switch to SecretBytes rather than home grown secret key
  • Loading branch information
stephenc committed Sep 23, 2016
2 parents e682318 + 7bd4f7e commit c3cc4866bb5fd3b5e2894953f77e827ec85864b4
Showing with 505 additions and 92 deletions.
  1. +94 −62 pom.xml
  2. +166 −28 src/main/java/org/jenkinsci/plugins/plaincredentials/impl/FileCredentialsImpl.java
  3. +2 −0 src/main/java/org/jenkinsci/plugins/plaincredentials/impl/StringCredentialsImpl.java
  4. +1 −1 src/main/resources/org/jenkinsci/plugins/plaincredentials/impl/FileCredentialsImpl/credentials.jelly
  5. +1 −1 src/test/java/org/jenkinsci/plugins/plaincredentials/BaseTest.java
  6. +5 −0 src/test/java/org/jenkinsci/plugins/plaincredentials/FileCredentialsTest.java
  7. +190 −0 src/test/java/org/jenkinsci/plugins/plaincredentials/SecretBytesTest.java
  8. +2 −0 src/test/resources/org/jenkinsci/plugins/plaincredentials/SecretBytesTest/loadUnencrypted/config.xml
  9. +19 −0 .../resources/org/jenkinsci/plugins/plaincredentials/SecretBytesTest/loadUnencrypted/credentials.xml
  10. +2 −0 ...est/resources/org/jenkinsci/plugins/plaincredentials/SecretBytesTest/migrateLegacyData/config.xml
  11. +19 −0 ...esources/org/jenkinsci/plugins/plaincredentials/SecretBytesTest/migrateLegacyData/credentials.xml
  12. +1 −0 ...est/resources/org/jenkinsci/plugins/plaincredentials/SecretBytesTest/migrateLegacyData/secret.key
  13. +1 −0 ...urces/org/jenkinsci/plugins/plaincredentials/SecretBytesTest/migrateLegacyData/secrets/master.key
  14. BIN ...sTest/migrateLegacyData/secrets/org.jenkinsci.main.modules.instance_identity.InstanceIdentity.KEY
  15. +2 −0 ...tesTest/migrateLegacyData/secrets/org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl
156 pom.xml
@@ -1,63 +1,95 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.9</version>
</parent>
<artifactId>plain-credentials</artifactId>
<version>1.3-SNAPSHOT</version>
<packaging>hpi</packaging>
<name>Plain Credentials Plugin</name>
<description>Allows use of plain strings and files as credentials.</description>
<url>http://wiki.jenkins-ci.org/display/JENKINS/Plain+Credentials+Plugin</url>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<jenkins.version>1.580.1</jenkins.version>
<java.level>6</java.level>
</properties>
<licenses>
<license>
<name>MIT</name>
<url>http://opensource.org/licenses/MIT</url>
</license>
</licenses>
<scm>
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
<tag>HEAD</tag>
</scm>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId>
<version>1.21</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<configuration>
<loggers>
<org.jenkinsci.plugins.plaincredentials>FINE</org.jenkinsci.plugins.plaincredentials>
</loggers>
</configuration>
</plugin>
</plugins>
</build>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ The MIT License
~
~ Copyright 2013-2016 Jesse Glick, Stephen Connolly and CloudBees, Inc..
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.15</version>
</parent>

<artifactId>plain-credentials</artifactId>
<version>1.3-SNAPSHOT</version>
<packaging>hpi</packaging>

<name>Plain Credentials Plugin</name>
<description>Allows use of plain strings and files as credentials.</description>
<url>http://wiki.jenkins-ci.org/display/JENKINS/Plain+Credentials+Plugin</url>
<licenses>
<license>
<name>MIT</name>
<url>http://opensource.org/licenses/MIT</url>
</license>
</licenses>

<scm>
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
<tag>HEAD</tag>
</scm>

<properties>
<jenkins.version>1.609</jenkins.version>
<java.level>6</java.level>
</properties>

<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId>
<version>2.1.5</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<configuration>
<loggers>
<org.jenkinsci.plugins.plaincredentials>FINE</org.jenkinsci.plugins.plaincredentials>
</loggers>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit c3cc486

Please sign in to comment.