Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e121601
Removed unnecessary modules and combined command and storage to parent
Mar 11, 2022
5545487
Removed unnecessary classes
Mar 11, 2022
1d94ecc
Removed auth request related logic
Mar 11, 2022
ae1e04e
Removed unnecessary test classes
Mar 11, 2022
0d7568b
Modified Azure-related string to remove Azure references
Mar 11, 2022
afb2480
Removed Groovy unit-tests
Mar 11, 2022
60f865c
Removed serialization/deserialization from Token
Mar 11, 2022
369f68e
Cleanup and removed unused imports (turned on checkstyle for that)
Mar 11, 2022
52a7c3e
Removed EULA and travis conf
Mar 14, 2022
a661d88
Update sample app
Mar 14, 2022
50d45e1
Update root POM
Mar 14, 2022
bd973c8
Change package name to com.microsoft.a4o.credentialstorage
Mar 15, 2022
27d5048
Remove dependency on Microsoft oauth2-useragent library
Mar 15, 2022
188d1e4
Added NOTICE file
Mar 15, 2022
6e6f626
Extracted CONTRIBUTING.md and updated README.md with a reference to t…
Mar 15, 2022
89e0bac
Removed ThirdPartyNotices.txt
Mar 15, 2022
d5d0b3e
Include LICENCE.txt and NOTICE.txt in JAR
Mar 15, 2022
98afad4
Fixed unchecked and unsafe code
Mar 15, 2022
b95cdfe
Use IOHelper for stream reading
Mar 16, 2022
e2f2251
Extracted CODE_OF_CONDUCT.md
Mar 16, 2022
92c1f59
Changed artefact id to credential-secure-storage
Mar 16, 2022
8954ae9
Updated POM.xml for Microsoft Maven requirements
Mar 16, 2022
511fd75
Refactoring - delete Debug class
Mar 17, 2022
12e1dab
Refactoring - delete PropertyBag class
Mar 17, 2022
417b1a5
Refactoring - delete Func class
Mar 17, 2022
2062ef8
Refactoring - delete LoggingHelper class
Mar 17, 2022
d37e8c4
Refactoring - delete ObjectExtensions class
Mar 17, 2022
5a064c6
Refactoring - delete SettingsHelper, SimpleJson and Path classes
Mar 17, 2022
aad71f3
Refactoring - encapsulate fields in Credential, Token, TokenPair
Mar 17, 2022
0a94e8e
Refactoring - delete Guid
Mar 17, 2022
2ca0fb6
Refactoring - delete file backed stores
Mar 17, 2022
05409cc
Refactoring - delete IOHelper
Mar 17, 2022
5e1a692
Clean up
Mar 17, 2022
202eb86
Fixed empty access token for TokenPair
Mar 17, 2022
c350955
Updated sample app
Mar 17, 2022
77f982c
Refactor - move xml serialize/deserialize to store
Mar 17, 2022
ae0b9bc
Fix CLI input on macOS
Mar 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Microsoft Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).

Resources:

- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Contributing

This project welcomes contributions and suggestions. Most contributions require you to
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visit
https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
7 changes: 7 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NOTICES

This repository incorporates material as listed below or described in the code.

This product includes software from https://github.com/microsoft/vsts-authentication-library-for-java.
Copyright (c) Microsoft. All rights reserved.
Licensed under the MIT license.
79 changes: 22 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,42 @@
# Visual Studio Team Services Authentication Library for Java (Preview) [![Build Status](https://travis-ci.org/Microsoft/vsts-authentication-library-for-java.svg?branch=master)](https://travis-ci.org/Microsoft/vsts-authentication-library-for-java)
Retrieve OAuth2 Access Token or Personal Accesss Tokens for Visual Studio Team Services (visualstudio.com) accounts. Also provides secure storage for those secrets on different platforms.
# Credential Secure Storage for Java
Unified interface to store Java application secrets on different platforms.

To learn more about Visual Studio Team Services and our Java specific tools, please visit https://java.visualstudio.com.
The library is derivative work from [Visual Studio Team Services Authentication Library for Java (Preview)](https://github.com/microsoft/vsts-authentication-library-for-java),
`auth-secure-storage` module in particular, focusing on secure storage only.

What this library provides
--------------------------
This library provides:

1. a set of `authenticators` in the `core` module that can be used to retrieve credentials in the form of OAuth2 Access Token or Personal Access Token against any Visual Studio Team Services account.
1. a set of secure `storage` providers that store retrieved secrets, as well as In memory and File system backed insecure storages.
1. a set of `providers` that hide the interaction between `storage` and `authenticator`, and returns authenticated `client` that can be used directly against Visual Studio Team Services REST APIs.
# What this library provides
This library provides a set of secure `storage` providers that store retrieved secrets, as well as In memory and File system backed insecure storages.

### Available Secure Storage Providers:
| Secret Type | Windows (Credential Manager) | Linux (GNOME Keyring v2.22+) | Mac OSX (Keychain)|
|------------------------------------------------|------------------------------|-------------------------------|-------------------|
| Username / Password Credentials (`Credential`) | Yes | Yes | Yes |
| OAuth2 Access/Refresh Token (`TokenPair`) | Yes (On Windows 7, 8/8.1 and 10) | Yes | Yes |
| Personal Access Token (`Token`) | Yes | Yes | Yes |

| Secret Type | Windows (Credential Manager) | Linux (GNOME Keyring v2.22+) | Mac OSX (Keychain)|
|--------------------------|------------------------|-------------------------|-------------------------|
| Username / Password Combo (`Credential`) | Yes | Yes | Yes |
| OAuth2 Access/Refresh Token (`TokenPair`) | Yes (On Windows 7, 8/8.1 and 10) | Yes | Yes |
| VSTS Personal Access Token (`Token`) | Yes | Yes | Yes |


How to use this library
-----------------------

# How to use this library
Maven is the preferred way to referencing this library.

```xml
<dependency>
<groupId>com.microsoft.alm</groupId>
<artifactId>auth-providers</artifactId>
   <version>0.6.4</version>
</dependency>
```

If only interested in specific modules:

```xml
<dependency>
<groupId>com.microsoft.alm</groupId>
<artifactId>auth-secure-storage</artifactId>
   <version>0.6.4</version>
<groupId>com.microsoft.a4o</groupId>
<artifactId>credential-secure-storage</artifactId>
<version>1.0.0</version>
</dependency>
```

```xml
<dependency>
<groupId>com.microsoft.alm</groupId>
<artifactId>auth-core</artifactId>
   <version>0.6.4</version>
</dependency>
```

Here is a [Sample App](sample/src/main/java/com/microsoft/alm/auth/sample/App.java) that uses this library.
Here is sample code for [credentials](sample/src/main/java/com/microsoft/a4o/credentialstorage/sample/AppCredential.java)
and [tokens](sample/src/main/java/com/microsoft/a4o/credentialstorage/sample/AppToken.java) that shows how to use this library.


How to build
------------
# How to build
1. JDK 11
2. Maven 3.8+
3. `mvn clean verify`


How can I contribute?
---------------------
This is a preview release, please open issues and give us feedback! We also welcome Pull Requests.


License
-------
# License
The MIT license can be found in [LICENSE.txt](LICENSE.txt)
See the [NOTICE.txt](NOTICE.txt) file for required notices and attributions.


Code of Conduct
---------------
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 [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

# Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
37 changes: 37 additions & 0 deletions SECURITY.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
Loading