-
Notifications
You must be signed in to change notification settings - Fork 103
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
Test Credentials method fails (some params missing in api call) #261
Comments
First off, thank you SO much for the detail of this issue. And thank you for all the detail, and the time you spent bringing this to our attention! |
K, we've been able to confirm this is in fact a defect. We're going to try and see if we can find the best solution, and update (sometime today) with a better timeline when the fix should go out. Thank you again @monkykap |
You are very welcome. Thank you for supporting the API with a ruby client! We think it is very helpful in quickly addressing our team's use cases and adding automated functionality to to the existing Nexpose product. |
@monkykap let's see if this fixes your issue; try using the gem on the Can you let us know if all your use cases work correctly using this branch of the gem? If you're using a
Then after you If you're not using a Gemfile, then you'd have to clone our repo, checkout the branch, then build the gem locally, and install it. As soon as you let us know this patch fixed your issue, we can go ahead and do an actual new release of the gem. Thanks again!! |
@sgreen-r7 I installed gem from github, however I am still getting same results. I am not 100% sure the gem I installed was from the correct branch of the repo (not sure the checkout worked). Is there a specific line in the one of the classes you can point me to so I can verify the correct branch w/ the changes was installed. Thank you. |
@monkykap One thing that i probably should have mentioned is you should Make sure you go ahead and do that, prior to checking the code of the gem you've installed. You can see the lines I've added by viewing the pull request I have open. Also the SharedCredentials class will have it's own Let me know how that goes, or if you have any additional questions about testing the feature. |
I uninstalled old gem afterwards (it was version 5.2.0) so i don't think that is causing it, but i will make sure to uninstall before for future installs. I confirmed the one I installed does not have the new test method in sharedcredential. I will try re-installing gem. When i checkout the branch i get the following: git checkout -b shared_cred_test nexpose-client/lib/nexpose/ Can you please help me with this command; i tried a few different paths with same error. |
you should only need to use |
okay,started from scratch: uninstalled nexpose gem i get error on rake, should i proceed with installing the built gem? root@kali: |
i wonder if i should just do rake install instead? edit: i will try again with rake build; rake install. root@kali: |
Alright, looks like that article I linked was a but old; the rake command has been updated.
|
Awesome! Thanks for working through it. We'll look to doing a public release by the end of today. So be only the lookout for 5.3.1 shortly. Thanks again for your help and bringing this to our attention! |
Cool, going to close out this issue, and this fix was pushed live with Release 5.3.1. |
Thank you for resolving this so quickly! |
Expected Behavior
XML response should return success="1" confirming authentication was successful same as console ui. Also parameters for the api call should match value made by the console.
Current Behavior
Receive error message in XML response (success="0") using same credential set that is working when scanning using the API.
Working response from console ui:
Possible Solution
I’m pretty new to ruby but I think something is off between the naming for the attribute/accessor methods between the two classes (SharedCredentialSummary inherits from Credential and SharedCredential inherits from SharedCredentialSummary) that is causing the discrepancy.
SharedCredentialSummary accessors:
Shared Credential accessors:
Assignment in Credential:
Steps to Reproduce (for bugs)
Note: Some parameters set in SharedCredentials missing.
Ruby code that reproduces the issue:
Context
Trying to create Ad-Hoc Client for Server Build Process and other Business/Security Processes. Would like the AdHoc-Client to be able to test credentials and use the api call to validate user entered credentials work. This will help us automate some of the management of new credentials for assets in the credential manager for new assets (Unix/Linux Systems). It would be great if the object returned by shared credential list would in the future be able to perform test credential (currently not supposed to work and unrelated issue/feature request).
Your Environment
The text was updated successfully, but these errors were encountered: