diff --git a/CHANGELOG.md b/CHANGELOG.md index 5035f0d..2c8db70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## Unreleased +## [Unreleased] -## 1.4.0 - 2018-07-05 +## [2.0.0] - 2020-06-10 +### Added +- Conjur V5 API support +- Ability to control "limit" and "offset" for `ListUsers()` and `ListVariables()` + +### Removed +- Conjur V4 API support + +## [1.4.0] - 2018-07-05 ### Added - Add Role entity with all corresponding methods @@ -20,10 +28,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Client.ListVariables method to list for variables. - Client.ActingAs property (currently with support limited to the above). -## 1.1.1 - 2018-03-06 +## [1.1.1] - 2018-03-06 ### Fixed - The built-in authenticator is now thread-safe. -## 1.1.0 - 2018-01-09 +## [1.1.0] - 2018-01-09 ### Added - `Variable.AddValue()` method for adding variable values. + +[Unreleased]: https://github.com/cyberark/conjur-api-dotnet/compare/v2.0.0...HEAD +[2.0.0]: https://github.com/cyberark/conjur-api-dotnet/compare/v1.4.0...v2.0.0 +[1.4.0]: https://github.com/cyberark/conjur-api-dotnet/compare/v1.3.0...v1.4.0 +[1.1.1]: https://github.com/cyberark/conjur-api-dotnet/compare/v1.1.0...v1.1.1 +[1.1.0]: https://github.com/cyberark/conjur-api-dotnet/releases/tag/v1.1.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 335415c..b4a1eb3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,29 @@ For general contribution and community guidelines, please see the [community repo](https://github.com/cyberark/community). -## Contributing +## Table of Contents + +- [Development](#development) +- [Testing](#testing) +- [Releases](#releases) +- [Contributing](#contributing-workflow) + +## Development + +- Visual Studio 2015 +- Use C#6 syntax + - C#7 syntax is not supported + +## Testing + +- Tests are stored in `test/` +- WebMocker.cs is used to mock web requests + +## Releases + +Manual releases + +## Contributing Workflow 1. [Fork the project](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) 2. [Clone your fork](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) @@ -12,5 +34,4 @@ For general contribution and community guidelines, please see the [community rep 5. [Create new Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) From here your pull request will be reviewed and once you've responded to all -feedback it will be merged into the project. Congratulations, you're a -contributor! +feedback it will be merged into the project. Congratulations, you're a contributor! \ No newline at end of file diff --git a/README.md b/README.md index e15379e..17d7596 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,30 @@ # Conjur API for .NET -This is a *Draft* implementation of the .NET API for [V5 Conjur](https://developer.conjur.net/). -This implementation includes an example that shows how to: +Programmatic .NET access to [Conjur](https://conjur.org) (for both Conjur OSS and Enterprise/DAP versions). +This .NET SDK allows developers to build new apps in .NET that communicate with Conjur by +invoking our Conjur API to perform operations on stored data (add, retrieve, etc) - - Authenticate - - Load Policy - - Check permissions to get the value of a variable - - Get the value of a variable - - Use a Host Factory token to create a new Host and get an apiKey to use with Conjur +## Table of Contents + +- [Requirements](#requirements) +- [Building](#building) +- [Methods](#methods) +- [Example](#example) +- [Contributing](#contributing) +- [License](#license) + +## Requirements + +- DAP v10+ or Conjur OSS v1+ + +For Conjur Enterprise V4, use the [V4 branch](https://github.com/cyberark/conjur-api-dotnet/tree/v4) ## Building This sample was built and tested with Visual Studio 2015. -To load in Visual Studio, from the Visual Studio File menu select Open > Project/Solution > api-dotnet.sln and build the solution. This will create: +To load in Visual Studio, from the Visual Studio File menu select Open > Project/Solution > api-dotnet.sln + and build the solution. This will create: - conjur-api.dll: the .NET version of the Conjur API. - ConjurTest.dll: test DLL used for automated testing of the Conjur .NET API @@ -85,35 +96,9 @@ Optionally, to build in a Docker container, it is recommended to use Mono and xb #### `String variable.GetValue()` - Return the value of the current Variable -## Usage - -To run the sample in Visual Studio, set the `example` project as the Startup Project. To do so, in the Solution Explorer right click over `example` and select `Set as Startup Project`. - -```sh -Usage: Example - - - - - - -``` - -`applianceURL`: the applianceURL e.g. `https://conjurmaster.myorg.com/` +## Examples -`applianceCertificatePath`: the path and name of the Conjur appliance certificate. The easiest way to get the certifiate is to use the Conjur CLI command `conjur init -u conjurmaster.myorg.com -f .conjurrc`. The certificate can be taken from any system you have run the Conjur CLI from. - -`accountName`: The name of the account in Conjur. - -`username`: Username of a user in Conjur. Alternatively can be a hostname. - -`password`: Password of a user in Conjur. Alternatively can be a host apiKey. - -`variableId`: The name of an existing variable in Conjur that has a value set and for which the `username` has execute permissions. - -`hostFactoryToken`: A host factory token. The easiest way to get a host factory token for testing is to add a hostfactory to a layer using the Conjur CLI command `conjur hostfactory create` and `conjur hostfactory token create`. Take the token returned from that call and pass it as the hostFactoryToken parameter to this example. - -## Example +#### Example Code ```sh // Instantiate a Conjur Client object. @@ -151,6 +136,58 @@ Usage: Example } ``` +#### Example App + +This example app shows how to: + + - Authenticate + - Load Policy + - Check permissions to get the value of a variable + - Get the value of a variable + - Use a Host Factory token to create a new Host and get an apiKey to use with Conjur + +To run the sample in Visual Studio, set the `example` project as the Startup + Project. To do so, in +the Solution Explorer right click over `example` and select `Set as Startup Project`. + +```sh +Usage: Example + + + + + + +``` + +`applianceURL`: the applianceURL e.g. `https://conjurmaster.myorg.com/` + +`applianceCertificatePath`: the path and name of the Conjur appliance + certificate. The easiest way to get the certifiate is to use the Conjur +CLI command `conjur init -u conjurmaster.myorg.com -f .conjurrc`. The certificate can be taken from any system you have run the Conjur CLI from. + +`accountName`: The name of the account in Conjur. + +`username`: Username of a user in Conjur. Alternatively can be a hostname. + +`password`: Password of a user in Conjur. Alternatively can be a host apiKey. + +`variableId`: The name of an existing variable in Conjur that has a value set and for which the `username` has execute permissions. + +`hostFactoryToken`: A host factory token. The easiest way to get a host + factory token for testing is to add a hostfactory to a layer using +the Conjur CLI command `conjur hostfactory create` and + `conjur hostfactory token create`. Take the token returned from that call +and pass it as the hostFactoryToken parameter to this example. + + + +## Contributing + +We welcome contributions of all kinds to this repository. For instructions on + how to get started and descriptions +of our development workflows, please see our [contributing guide](https://github.com/cyberark/conjur-api-dotnet/blob/master/CONTRIBUTING.md). + ## License -This repository is licensed under Apache License 2.0 - see [`LICENSE`](LICENSE) for more details. +This repository is licensed under Apache License 2.0 - see [`LICENSE`](LICENSE) for more details. \ No newline at end of file diff --git a/conjur-api/Properties/AssemblyInfo.cs b/conjur-api/Properties/AssemblyInfo.cs index 7ae330f..061a510 100644 --- a/conjur-api/Properties/AssemblyInfo.cs +++ b/conjur-api/Properties/AssemblyInfo.cs @@ -19,7 +19,7 @@ /// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". /// The form "{Major}.{Minor}.*" will automatically update the build and revision, /// and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("1.2.*")] +[assembly: AssemblyVersion("2.0.*")] #if (!SIGNING) [assembly: InternalsVisibleTo("ConjurTest")]