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

Updated readme with various newer information and cleanups #71

Merged
merged 4 commits into from
May 8, 2020

Conversation

sgnn7
Copy link
Contributor

@sgnn7 sgnn7 commented May 6, 2020

The README was seriously out of date and did not contain relevant info
for the current version of the code. The new changes should get us up to
date and reduce problems with deployments/usages of this library.

Also fixed issues w/ javadoc generation

Fixes #70
Fixes #50
Fixes #39
Fixes #18
Connected to #18

sgnn7 added 2 commits May 6, 2020 15:18
The README was seriously out of date and did not contain relevant info
for the current version of the code. The new changes should get us up to
date and reduce problems with deployments/usages of this library.
We had a lot of inconsistent tab/whitespace usage all over the place so
now we have fixed those to only use spaces.
@sgnn7 sgnn7 marked this pull request as ready for review May 6, 2020 20:44
@sgnn7 sgnn7 requested review from alexkalish and izgeri May 6, 2020 20:46
@JakeQuilty
Copy link
Contributor

Using JAR file, step 3: markdown error
Configuration, steps 2, 4, 5: markdown

I ran through the README and it looks good! The flow was a lot easier. I haven't run through the Maven steps though

README.md Outdated

`CONJUR_AUTHN_API_KEY` - user/host API key
The following environment variables need to be included in the apps runtime environment in
Copy link
Contributor

@izgeri izgeri May 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following environment variables need to be included in the apps runtime environment in
The following environment variables may need to be included in the app's runtime environment in

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional. They don't have to be included - they can be supplemented by system properties or inlined code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, updated with a qualifier and still want to get that apostrophe in :)

README.md Outdated
// Authenticate using provided username/hostname and password/API key
Conjur conjur = new Conjur('host/host-id', 'api-key');
// or
Conjur conjur = new Conjur('username', 'password');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it really work with password or API key? if it's a password, the client would have to know to login first and then authenticate with the API key, right?

maybe that is how it works, but I'm not sure from the method signature that the function would know whether it has a password or API key to make the decision about what to do, and afaik the authenticate route requires an API key

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'll look into this - there's a confusion I think in some of our "api" vs "password" wording

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a good setup to get a host working but I think the phrasing here is:
Conjur('host/host-id', 'api-key'); will try logging in with host as user and api-key as password
Conjur conjur = new Conjur('username', 'password'); will try logging in with username as user and password as password.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you tried it with username / password? if it works, then I suppose this can stay as-is

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used the admin account (which I suppose has an "api key" even though it's realistically the password(?) ). let me make a real user and set a password to see what's going on here - I might just be confused.

Copy link
Contributor

@izgeri izgeri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some feedbacks, but in general this is a big improvement. Thanks for digging into this @sgnn7!

This was due to issues with JDK and can be worked around by setting a
few config variables on the plugin.

Upstream: https://bugs.openjdk.java.net/browse/JDK-8212233
@sgnn7 sgnn7 force-pushed the 63-update-readme branch from 500de88 to a4f73aa Compare May 7, 2020 15:22
Copy link

@alexkalish alexkalish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome. Thanks, @sgnn7.

README.md Outdated
3. Run `mvn package -DskipTests` to generate a JAR file. The output `.jar` files will be located
in the `target` directory of the repo

_NOTE:_ we ran `mvn package` without running the integration tests, since these require access

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_NOTE:_ we ran `mvn package` without running the integration tests, since these require access
_NOTE:_ the above command runs `mvn package` without running the integration tests, since these require access

CONJUR_AUTHN_API_KEY=sb0ncv1yj9c4w2e9pb1a2s
CONJUR_APPLIANCE_URL=https://conjur.myorg.com/api
```sh-session
mvn exec:java \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they aren't sensitive, it's probably move common to provide them in the pom.xml file itself within ` element. See docs.

Copy link
Contributor Author

@sgnn7 sgnn7 May 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True but I didn't have time to investigate if those persist in the created artifacts (generated jar). That part may be for a followup issue.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they are put into the parent project pom.xml, they should apply to included compiled, dependencies. But, still, fine to leave for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough - it's definitely something that could be expanded here (once we have a bit more time on it)

@sgnn7 sgnn7 force-pushed the 63-update-readme branch from a4f73aa to 2f944c8 Compare May 7, 2020 20:14
Some clarifications to the wording and formatting was done to the README
as part of this commit.
@sgnn7 sgnn7 force-pushed the 63-update-readme branch from 2f944c8 to 8ce3cb6 Compare May 7, 2020 20:54
@codeclimate
Copy link

codeclimate bot commented May 7, 2020

Code Climate has analyzed commit 8ce3cb6 and detected 107 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 107

View more on Code Climate.

@sgnn7 sgnn7 merged commit 80553b4 into master May 8, 2020
@sgnn7 sgnn7 deleted the 63-update-readme branch May 8, 2020 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants