-
Notifications
You must be signed in to change notification settings - Fork 49
Feat/Sha256 password import #301
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -98,23 +98,30 @@ The more data that you include for import, the easier we can set up your users i | |
| ### Password data (optional) | ||
|
|
||
| - `hashed_password` - the user’s password encrypted using a hashing method or algorithm. | ||
| - `hashing_method` - the name of the algorithm used to encrypt the user’s password. Currently **crypt**, **bcrypt**, **md5**, and **wordpress** are supported. [Contact us](https://kinde-21631392.hs-sites.com/en-au/feature-request) if you need a different method. | ||
| - `hashing_method` - the name of the algorithm used to encrypt the user’s password. Currently **crypt**, **bcrypt**, **sha256**, **md5**, and **wordpress** are supported. [Contact us](https://kinde-21631392.hs-sites.com/en-au/feature-request) if you need a different method. | ||
| - `salt` - extra characters added to passwords to make them stronger | ||
| - `salt_position` - position of salt in password string. E.g. prefix (before) or suffix (after). | ||
| - `salt_format` - format of the salt, e.g. hex, string, etc. | ||
|
|
||
| <Aside title="bcrypt $2b variant support:"> | ||
| <Aside title="bcrypt $2b variant support:"> | ||
|
|
||
| Please note if you are importing bcrypt hashes with the $2b variant, Kinde will substitute this for the $2a variant. These are interchangeable as long as you were not running OpenBSD at the time the hashes were generated. | ||
|
|
||
| </Aside> | ||
|
|
||
| - `salt` - extra characters added to passwords to make them stronger | ||
| - `salt_position` - position of salt in password string. Prefix (before) or suffix (after). | ||
| <Aside title="sha256 support:"> | ||
|
|
||
| Provide the hash in hex format. Import the salt using the `salt` column. For the `salt_format`, specify how the salt should be interpreted: e.g. **hex** for a hex-encoded string (68656c6c6f for hello). By default, the salt is treated as a plain string, and escape sequences (like \n or \v) are treated as literal characters. | ||
|
|
||
| </Aside> | ||
|
Comment on lines
+112
to
+116
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add SHA256 implementation examples The SHA256 documentation should include specific examples of hash generation and salt combination. Consider adding implementation details: <Aside title="sha256 support:">
- Provide the hash in hex format. Import the salt using the `salt` column. For the `salt_format`, specify how the salt should be interpreted: e.g. **hex** for a hex-encoded string (68656c6c6f for hello). By default, the salt is treated as a plain string, and escape sequences (like \n or \v) are treated as literal characters.
+ SHA256 implementation details:
+ 1. Hash format: Provide the hash in lowercase hex format (64 characters)
+ 2. Salt handling:
+ - For prefix salt: SHA256(salt + password)
+ - For suffix salt: SHA256(password + salt)
+
+ Example:
+ ```csv
+ email,hashed_password,hashing_method,salt,salt_position,salt_format
+ user@example.com,5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8,sha256,mysalt,suffix,string
+ ```
+ This example represents: SHA256("password" + "mysalt")
</Aside> |
||
|
|
||
| | Hashing method | Salt | Salt position | | ||
| | -------------- | -------- | ------------------------- | | ||
| | md5 | Optional | required if salt included | | ||
| | bcrypt | | | | ||
| | crypt | Optional | | | ||
| | wordpress | Optional | | | ||
| | sha256 | Optional | required if salt included | | ||
|
|
||
| ### **Example simple csv import** | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add security recommendations for hashing methods
While the documentation accurately lists the supported hashing methods, it should include security recommendations to guide users toward more secure choices.
Consider reordering the methods by security strength and adding a security note:
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[uncategorized] ~101-~101: A comma may be missing after the conjunctive/linking adverb ‘Currently’.
Context: ...hm used to encrypt the user’s password. Currently crypt, bcrypt, sha256, **md...
(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)