Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review technical debt in repo and make plan for nearterm enhancements #41

Closed
9 of 21 tasks
izgeri opened this issue Apr 29, 2020 · 2 comments
Closed
9 of 21 tasks

Comments

@izgeri
Copy link
Contributor

izgeri commented Apr 29, 2020

REVIEWING ca-conjur-api-dotnet-v5-master BRANCH

Review this repo and document items in the following categories with links to filed issues.

In addition, document succinctly whether this integration works with Conjur OSS / DAP and what methods are supported.

Supported flows

Note which flows are supported, and next to each that is supported note the method name. We can use this to improve the README documentation.

  • Conjur OSS
  • DAP
  • Instantiate with API key
  • Instantiate with access token
  • Configure from environment
  • Configure from .netrc
  • Configure from .conjurrc
  • Policy
    • Notes on what's possible: (PUT / PATCH / DELETE?)
    • Load Policy
  • Get a secret value
  • Set a secret value
  • Batch secret value retrieval
  • Get list of resources visible to authenticating user (eg as in conjur list)

Methods

Client

Client Client(uri, account)

  • Create new Conjur instance

LogIn(string userName, string password)

  • Login to a Conjur user
    • userName - Username of Conjur user to login as
    • password - Passwordof user

TrustedCertificates.ImportPem (string certPath)

  • Add Conjur root certificate to system trust store
    • certPath = Path to cert

<Client>.Credential = new NetworkCredential(string userName, string apiKey)

  • To login with an API key, use it directly
    • userName - Username of user to login as
    • apiKey - API key of user

IEnumerable<Variable> ListVariables(string query = null)

  • Returns a list of variable objects
    • name="query" - Additional Query parameters, not required

uint CountVariables(string query = null)

  • Count Conjur resource of kind variable
    • name="query" - Additional Query parameters, not required

Host CreateHost(string name, string hostFactoryToken)

  • Creates a host using a host factory token
    • name - Name of the host to create
    • hostFactoryToken - Host factory token

Policy

Policy <Client>.Policy(string policyName)

  • Create a Conjur policy object
    • policyName - Name of policy

policy.LoadPolicy(Stream policyContent)

  • Load policy into Conjur
    • policyContent - The policy

Variable

Variable <Client>.Variable(string name)

  • Instantiate a Variable object
    • name - Name of the variable

Boolean Check(string privilege)

  • Check if the current user has specified privilege on this variable
    • privilege - string name of the privilege to check for
      • Privileges: read, create, update, delete, execute

AddSecret(string val)

  • Change current Variable to val
    • val - Value to update current Variable to

String GetValue()

  • Return the value of the current Variable

Improvements to release process

Repo documentation improvements

Test suite improvements (in particular, tests to add to alert us early to breakages)

Repo standard maintenance tasks

  • This branch needs to be merged into master, because master is not current with the v5 Conjur API

Enhancement requests to consider



## Bugs



- Fix error handling for policy loading for users/hosts w/ api_key_enabled (unconfirmed) - (#38)

Visual Studio 2019

  • When running tests without making changes: 8 Fails, 9 Passed
    • api-dotnet.test.Conjur.Test.AuthenticatorTest.TestTokenCaching
    • api-dotnet.test.Conjur.Test.AuthenticatorTest.TestTokenThreadSafe
    • api-dotnet.test.Conjur.Test.ClientTest.ActingAsTest
    • api-dotnet.test.Conjur.Test.ClientTest.TestLogin
    • api-dotnet.test.Conjur.Test.HostFactoryTest.TestCreateHost
    • api-dotnet.test.Conjur.Test.ResourceTest.TestCheck
    • api-dotnet.test.Conjur.Test.UserTest.ListUserTest
    • api-dotnet.test.Conjur.Test.VariablesTest.GetVariableTest
    • api-dotnet.test.Conjur.Test.VariablesTest.ListVariableTest
@izgeri
Copy link
Contributor Author

izgeri commented May 5, 2020

@sgnn7 / @JakeQuilty I added you both here the same as in the Java card, for @JakeQuilty to review the functionality available and @sgnn7 to review the tech debt.

@JakeQuilty if you run into issues using this with Conjur OSS, please let us know right away (before continuing to profile)

@sgnn7
Copy link
Contributor

sgnn7 commented May 19, 2020

I've updated the post and I'll start opening up issues for those now.

@izgeri izgeri closed this as completed Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants