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

Added API Token authentication support #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ConnorGriffin
Copy link

@ConnorGriffin ConnorGriffin commented Mar 13, 2018

Made changes to Session.ps1 and Posh-Nessus.psm1 to support the use of API Secretkey/Accesskey authentication in addition to username/password authentication.

Example (using invalid/discarded API key):

> New-NessusSession -ComputerName 'scanner1.local' -Port 8834 -AccessKey '0472a87ffa7e3acc01e5c864bbf008a6bdc84de2af
27dd343a513187ce423093' -SecretKey 'aa7762a5b13ef6cb90ef852755f884ab8cd959944e9dbebdc51bfc8483927d4d'


SessionId : 1
URI       : https://scanner1.local:8834
Token     : {SecretKey, AccessKey}

Listing my Credential session and my API session. Both can be used by specifying the respective SessionID. No changes have been made to the way existing functions are used. Technically the API session is not a 'session', but it was the simplest way to add API support without completely rewriting the existing authentication framework:

> Get-NessusSession


SessionId : 0
URI       : https://scanner1.local:8834
Token     : 42bde0e16fa5638413d12840813aef72f7abede094e1a6c0

SessionId : 1
URI       : https://scanner1.local:8834
Token     : {SecretKey, AccessKey}

Verified

This commit was signed with the committer’s verified signature.
lobis Luis Antonio Obis Aparicio
@darkoperator
Copy link
Contributor

darkoperator commented Mar 14, 2018 via email

@nicpenning
Copy link

Merge please :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants