forked from pharo-nosql/mongotalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a minor refactoring on existing SCRAMSHA1AuthMechanism.
Common logic is moved to a new parent class SCRAMSHAAuthMechanism. Descendant classes SCRAMSHA1AuthMechanism and SCRAMSHA256AuthMechanism only customize the hash function to use. This PR doesn't implement the handshake mentioned in pharo-nosql#87.
- Loading branch information
Jose San Leandro
committed
Dec 22, 2020
1 parent
79cb81f
commit 6bccf51
Showing
30 changed files
with
99 additions
and
9 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/MONGODBCRAuthMechanism.class/class/description.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
description | ||
^ 'Challenge Response' |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/MONGODBCRAuthMechanism.class/class/isAbstract.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
isAbstract | ||
^ false |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/MongoAuthMechanism.class/class/description.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
description | ||
^ self subclassResponsibility |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/MongoAuthMechanism.class/class/isAbstract.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
isAbstract | ||
^ true |
Empty file.
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/NoAuthMechanism.class/class/description.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
description | ||
^ 'No authentication' |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/NoAuthMechanism.class/class/isAbstract.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
isAbstract | ||
^ false |
2 changes: 2 additions & 0 deletions
2
...e.package/NoAuthMechanism.class/instance/authenticateUsername.password.forcedDatabase..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
operations | ||
authenticateUsername: user password: pass forcedDatabase: aDatabase |
11 changes: 11 additions & 0 deletions
11
mc/Mongo-Core.package/NoAuthMechanism.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "MongoAuthMechanism", | ||
"category" : "Mongo-Core-Auth", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "NoAuthMechanism", | ||
"type" : "normal" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
I implement SCRAM-SHA1 auth mechanism |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMAuthMechanism.class/class/authenticateAgainstAdmin.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
authenticateAgainstAdmin | ||
overrideDB := true |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMAuthMechanism.class/class/isAbstract.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
testing | ||
isAbstract | ||
^ true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMAuthMechanism.class/instance/hashFunction.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
operations | ||
hashFunction | ||
^ self subclassResponsibility |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMAuthMechanism.class/instance/mechanismName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
operations | ||
mechanismName | ||
^ self subclassResponsibility |
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
mc/Mongo-Core.package/SCRAMAuthMechanism.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "mikefilonov 6/11/2017 12:24", | ||
"super" : "MongoAuthMechanism", | ||
"category" : "Mongo-Core-Auth", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "SCRAMAuthMechanism", | ||
"type" : "normal" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
I implement the SCRAM-SHA1 authentication mechanism. | ||
|
||
See: https://docs.mongodb.com/v4.0/core/security-scram/ | ||
See: https://docs.mongodb.com/v4.0/core/security-scram/ |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMSHA1AuthMechanism.class/class/description.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
description | ||
^ 'SCRAM-SHA-1' |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMSHA1AuthMechanism.class/class/isAbstract.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
isAbstract | ||
^ false |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMSHA1AuthMechanism.class/instance/hashFunction.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
operations | ||
hashFunction | ||
^ SHA1 |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMSHA1AuthMechanism.class/instance/mechanismName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
operations | ||
mechanismName | ||
^ 'SCRAM-SHA-1' |
4 changes: 2 additions & 2 deletions
4
mc/Mongo-Core.package/SCRAMSHA1AuthMechanism.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"commentStamp" : "MartinDias 10/23/2020 07:50", | ||
"super" : "MongoAuthMechanism", | ||
"super" : "SCRAMAuthMechanism", | ||
"category" : "Mongo-Core-Auth", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "SCRAMSHA1AuthMechanism", | ||
"type" : "normal" | ||
} | ||
} |
Empty file.
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMSHA256AuthMechanism.class/class/description.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
description | ||
^ 'SCRAM-SHA-256' |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMSHA256AuthMechanism.class/class/isAbstract.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
isAbstract | ||
^ false |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMSHA256AuthMechanism.class/instance/hashFunction.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
operations | ||
hashFunction | ||
^ SHA256 |
3 changes: 3 additions & 0 deletions
3
mc/Mongo-Core.package/SCRAMSHA256AuthMechanism.class/instance/mechanismName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
operations | ||
mechanismName | ||
^ 'SCRAM-SHA-256' |
11 changes: 11 additions & 0 deletions
11
mc/Mongo-Core.package/SCRAMSHA256AuthMechanism.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "SCRAMAuthMechanism", | ||
"category" : "Mongo-Core-Auth", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "SCRAMSHA256AuthMechanism", | ||
"type" : "normal" | ||
} |