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

v0.0.6-alpha Release #51

Closed
wants to merge 26 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f8625a6
Do not list unless prompted to list (#21)
AndrewCopeland Jan 8, 2021
d5dd264
Push current README changes for review
infamousjoeg Jan 8, 2021
6a5ba00
Fix typo to resolve issue #23 (#24)
AndrewCopeland Jan 8, 2021
a1abeec
modify the application CMD for authn-<action> (#25)
AndrewCopeland Jan 8, 2021
26fa9fe
Fix unit tests (#26)
AndrewCopeland Jan 8, 2021
06fb635
fix dev example
infamousjoeg Jan 8, 2021
a2f1710
Added code of conduct, contributing, updated readme
infamousjoeg Jan 9, 2021
99eaf76
v0.0.4-alpha
infamousjoeg Jan 11, 2021
7c167ea
Conjur commands (#27)
AndrewCopeland Jan 11, 2021
bb3b27e
Update conjur.go
infamousjoeg Jan 11, 2021
8f8a584
Merge branch 'dev' of https://github.com/infamousjoeg/pas-api-go into…
infamousjoeg Jan 11, 2021
bea2fbb
Safe members (#29)
AndrewCopeland Jan 11, 2021
e0fde5c
Number of Days will not be omitted when 0
AndrewCopeland Jan 12, 2021
f3aefd7
Dev creating application flow (#34)
AndrewCopeland Jan 12, 2021
e3f0d02
Merge branch 'main' into dev
AndrewCopeland Jan 12, 2021
33706b4
v0.0.5-alpha Ready for Release (#35)
infamousjoeg Jan 13, 2021
389cb05
Add new line to commands #33 (#39)
AndrewCopeland Jan 13, 2021
43aea0e
#38 Add cybr conjur logoff command (#40)
AndrewCopeland Jan 13, 2021
1dc2342
#44 refactor api tests (#45)
AndrewCopeland Jan 14, 2021
f8c0e92
Add #37 add verbose v006 (#41)
AndrewCopeland Jan 15, 2021
6c5dbc3
Fix #42 RADIUS authentication support for push, append, challenge/res…
infamousjoeg Jan 15, 2021
9b3901d
#30 Unsuspend a user from failed logon attempts (#43)
AndrewCopeland Jan 15, 2021
0c2cbfd
Merge branch 'main' into v006
infamousjoeg Jan 15, 2021
02f5804
Add logger to user api pkg
AndrewCopeland Jan 15, 2021
1116688
Remove duplicate tests
AndrewCopeland Jan 15, 2021
55ea054
Implement client.GetLogger() function so null logger cannot be returned
AndrewCopeland Jan 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove duplicate tests
  • Loading branch information
AndrewCopeland committed Jan 15, 2021
commit 11166886827f9d2c30b8bcdf4f0f4c909453858e
106 changes: 0 additions & 106 deletions pkg/cybr/api/safes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,109 +140,3 @@ func TestRemoveMemberInvalidMemberName(t *testing.T) {
t.Errorf("Removed a non-existent member. This should not happen")
}
}

func TestAddRemoveSafeMemberSuccess(t *testing.T) {
client := pasapi.Client{
BaseURL: hostname,
AuthType: "cyberark",
}

creds := pasapi.LogonRequest{
Username: username,
Password: password,
}

err := client.Logon(creds)
if err != nil {
t.Errorf("Failed to logon. %s", err)
}

safeName := "PasswordManager"
memberName := "test-add-member"

retrieveAccounts := pasapi.PermissionKeyValue{
Key: "RetrieveAccounts",
Value: true,
}

addMember := api.AddSafeMemberRequest{
Member: pasapi.AddSafeMember{
MemberName: memberName,
SearchIn: "Vault",
Permissions: []pasapi.PermissionKeyValue{retrieveAccounts},
},
}

err = client.AddSafeMember(safeName, addMember)
if err != nil {
t.Errorf("Failed to add member to safe. %s", err)
}

err = client.RemoveSafeMember(safeName, memberName)
if err != nil {
t.Errorf("Failed to remove member from safe. %s", err)
}
}

func TestAddMemberInvalidMemberName(t *testing.T) {
client := pasapi.Client{
BaseURL: hostname,
AuthType: "cyberark",
}

creds := pasapi.LogonRequest{
Username: username,
Password: password,
}

err := client.Logon(creds)
if err != nil {
t.Errorf("Failed to logon. %s", err)
}

safeName := "PasswordManager"
memberName := "notReal"

retrieveAccounts := pasapi.PermissionKeyValue{
Key: "RetrieveAccounts",
Value: true,
}

addMember := api.AddSafeMemberRequest{
Member: pasapi.AddSafeMember{
MemberName: memberName,
SearchIn: "Vault",
Permissions: []pasapi.PermissionKeyValue{retrieveAccounts},
},
}

err = client.AddSafeMember(safeName, addMember)
if err == nil {
t.Errorf("Added a non-existent member. This should not happen")
}
}

func TestRemoveMemberInvalidMemberName(t *testing.T) {
client := pasapi.Client{
BaseURL: hostname,
AuthType: "cyberark",
}

creds := pasapi.LogonRequest{
Username: username,
Password: password,
}

err := client.Logon(creds)
if err != nil {
t.Errorf("Failed to logon. %s", err)
}

safeName := "PasswordManager"
memberName := "notReal"

err = client.RemoveSafeMember(safeName, memberName)
if err == nil {
t.Errorf("Removed a non-existent member. This should not happen")
}
}