This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from Azure/dev
Merging dev to master for release.
- Loading branch information
Showing
240 changed files
with
53,299 additions
and
31,520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,71 @@ | ||
# Contributing | ||
# Microsoft Azure Key Vault SDK for Java | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
This is the Microsoft Azure Key Vault client library which allows for the consumption of Key Vault services. Azure Key Vault helps safeguard cryptographic keys and secrets used by cloud applications and services. By using Key Vault, you can encrypt keys and secrets (such as authentication keys, storage account keys, data encryption keys, .PFX files, and passwords) using keys protected by hardware security modules (HSMs). For added assurance, you can import or generate keys in HSMs. If you choose to do this, Microsoft processes your keys in FIPS 140-2 Level 2 validated HSMs (hardware and firmware). | ||
Key Vault streamlines the key management process and enables you to maintain control of keys that access and encrypt your data. Developers can create keys for development and testing in minutes, and then seamlessly migrate them to production keys. Security administrators can grant (and revoke) permission to keys, as needed. | ||
For more information refer to [What is Key Vault?](https://docs.microsoft.com/en-us/azure/key-vault/key-vault-whatis) or [Getting Started](https://docs.microsoft.com/en-us/azure/key-vault/key-vault-get-started). | ||
|
||
## Sample code | ||
You can find sample code that illustrates key vault usage scenarios [here](https://azure.microsoft.com/en-us/resources/samples/?sort=0&service=key-vault&platform=java). | ||
|
||
## Download | ||
|
||
To get the binaries of this library as distributed by Microsoft, ready for use within your project, you can use Maven. | ||
|
||
```xml | ||
<dependency> | ||
<groupId>com.microsoft.azure</groupId> | ||
<artifactId>azure-keyvault</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.microsoft.azure</groupId> | ||
<artifactId>azure-keyvault-cryptography</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.microsoft.azure</groupId> | ||
<artifactId>azure-keyvault-extensions</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.microsoft.azure</groupId> | ||
<artifactId>azure-keyvault-core</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.microsoft.azure</groupId> | ||
<artifactId>azure-keyvault-webkey</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
``` | ||
|
||
## Pre-requisites | ||
- A Java Developer Kit (JDK), v 1.7 or later | ||
- Maven | ||
|
||
## Building and Testing | ||
|
||
Clone the repo, then run `mvn compile` from the root directory. | ||
|
||
To run the recorded tests: | ||
1. If you have not already, you need to install the [Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html) package. | ||
2. run `mvn jetty:run` to start a jetty server. This starts a service that will block the terminal so you will likely want to open a second terminal to run the actual tests. | ||
3. In your second terminal run `mvn test`. | ||
|
||
## Contributing | ||
|
||
If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html). | ||
|
||
1. Fork it | ||
2. Create your feature branch (`git checkout -b my-new-feature`) | ||
3. Commit your changes (`git commit -am 'Add some feature'`) | ||
4. Push to the branch (`git push origin my-new-feature`) | ||
5. Create new Pull Request | ||
|
||
# More information | ||
* [Azure Key Vault Java Documentation](https://docs.microsoft.com/en-us/java/api/overview/azure/keyvault) | ||
* [What is Key Vault?](https://docs.microsoft.com/en-us/azure/key-vault/key-vault-whatis) | ||
* [Get started with Azure Key Vault](https://docs.microsoft.com/en-us/azure/key-vault/key-vault-get-started) | ||
* [Azure Key Vault General Documentation](https://docs.microsoft.com/en-us/azure/key-vault/) | ||
* [Azure Key Vault REST API Reference](https://docs.microsoft.com/en-us/rest/api/keyvault/) | ||
* [Azure Active Directory Documenation](https://docs.microsoft.com/en-us/azure/active-directory/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Regenerating SDK | ||
|
||
The code in the azure-keyvault package is generated via AutoREST. After code generation, there are currently several manual modifications that need to be made for the build to succeed. In the root of the azure-keyvault-java repo, there is a Python script called "regenerate_and_fix_sdk.py" which will automatically regenerate the code and apply the necessary fixes. To regenerate the code using this script: | ||
|
||
- Install AutoREST: https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md | ||
- Open the script in your favorite editor and change "swagger_source_branch" to contain the branch of the Azure REST spec API repo that you'd like the API spec to be sourced from – likely either "master" or "keyvault_preview" | ||
- If there is a tag you'd like to pass to AutoREST – set the "autorest_tag" branch accordingly. | ||
- Using Python 3.6+, run the script from the root of the checked out repository. Verify that no errors appear, and then build/test the SDK. | ||
|
||
|
||
|
||
The changes made by the script post-regeneration are as follows: | ||
|
||
* The generated webkey models will be removed | ||
|
||
|
||
* Any generated model class which has a corresponding custom class in the "models/custom" folder will be changed to inherit from the custom class. | ||
* Any class which utilizes webkey models will have the correct imports from the azure-keyvault-webkey package added | ||
* AutoREST occasionally generates broken parameter declarations in the Javadoc comments - these are repaired. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 3 additions & 15 deletions
18
azure-keyvault-core/src/main/java/com/microsoft/azure/keyvault/core/IKeyResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,43 @@ | ||
<!-- | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the MIT License. See License.txt in the project root for | ||
license information. | ||
--> | ||
<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> | ||
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under | ||
the MIT License. See License.txt in the project root for license information. --> | ||
<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>com.microsoft.azure</groupId> | ||
<artifactId>azure-keyvault-parent</artifactId> | ||
<version>1.0.1-SNAPSHOT</version> | ||
<version>1.1</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>azure-keyvault-cryptography</artifactId> | ||
<packaging>jar</packaging> | ||
<artifactId>azure-keyvault-cryptography</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<name>Microsoft Azure SDK for Key Vault Cryptography</name> | ||
<description>This package contains Microsoft Azure SDK for Key Vault Cryptography.</description> | ||
<url>https://github.com/Azure/azure-sdk-for-java</url> | ||
<name>Microsoft Azure SDK for Key Vault Cryptography</name> | ||
<description>This package contains Microsoft Azure SDK for Key Vault Cryptography.</description> | ||
<url>https://github.com/Azure/azure-sdk-for-java</url> | ||
|
||
<licenses> | ||
<license> | ||
<name>The MIT License (MIT)</name> | ||
<url>http://opensource.org/licenses/MIT</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<licenses> | ||
<license> | ||
<name>The MIT License (MIT)</name> | ||
<url>http://opensource.org/licenses/MIT</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<scm> | ||
<url>scm:git:https://github.com/Azure/azure-sdk-for-java</url> | ||
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
<scm> | ||
<url>scm:git:https://github.com/Azure/azure-sdk-for-java</url> | ||
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<legal> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<legal> | ||
<![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal> | ||
<checkstyle.skip>true</checkstyle.skip> | ||
</properties> | ||
<checkstyle.skip>true</checkstyle.skip> | ||
</properties> | ||
|
||
|
||
<dependencies> | ||
|
@@ -52,17 +50,28 @@ | |
<groupId>org.bouncycastle</groupId> | ||
<artifactId>bcprov-jdk15on</artifactId> | ||
<scope>test</scope> | ||
<version>1.54</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.microsoft.azure</groupId> | ||
<artifactId>azure-keyvault-core</artifactId> | ||
<version>1.0.1-SNAPSHOT</version> | ||
<version>1.59</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.microsoft.azure</groupId> | ||
<artifactId>azure-keyvault-webkey</artifactId> | ||
<version>1.0.1-SNAPSHOT</version> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.microsoft.azure</groupId> | ||
<artifactId>azure-keyvault-core</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.microsoft.rest</groupId> | ||
<artifactId>client-runtime</artifactId> | ||
<version>1.3.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.microsoft.azure</groupId> | ||
<artifactId>azure-client-authentication</artifactId> | ||
<version>1.3.0</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.