-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Error handling improvements #70
Error handling improvements #70
Commits on Nov 9, 2021
-
Start work on normalizing keyring names (#60).
Add get_password_for_target on Windows.
Configuration menu - View commit details
-
Copy full SHA for c6e3ca7 - Browse repository at this point
Copy the full SHA c6e3ca7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b32038 - Browse repository at this point
Copy the full SHA 8b32038View commit details
Commits on Nov 10, 2021
-
Finish refactoring; fix #60 on Mac
Keyrings now just keep the platform-specific attributes needed to store and retrieve the corresponding platform keyring item. This simplifies the platform-specific code and allows the actual keyring implementation to be platform independent (and thus documentable properly). In addition, you can now create a Keyring by passing in a mapper function which specifies exactly what platform attributes should be used given the service and username. This allows compatibility with 3rd-party keyring clients.
Configuration menu - View commit details
-
Copy full SHA for 4a68211 - Browse repository at this point
Copy the full SHA 4a68211View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3983b55 - Browse repository at this point
Copy the full SHA 3983b55View commit details -
1. Use Strings rather than strs to simplify lifetime management of the LinuxIdentity attributes. 2. Remove the mac keychain feature, which cannot be implemented due to deprecation of separate keychains on mac.
Configuration menu - View commit details
-
Copy full SHA for cc397b5 - Browse repository at this point
Copy the full SHA cc397b5View commit details
Commits on Nov 11, 2021
-
Get Windows to a compilable state.
1. add username into the map 2. remove platform conditionals in platform-specific files
Configuration menu - View commit details
-
Copy full SHA for 9587247 - Browse repository at this point
Copy the full SHA 9587247View commit details -
Configuration menu - View commit details
-
Copy full SHA for a393a3c - Browse repository at this point
Copy the full SHA a393a3cView commit details -
Merge branch 'master' into issue-60
Get updates to GitHub publish workflow.
Configuration menu - View commit details
-
Copy full SHA for 681ef03 - Browse repository at this point
Copy the full SHA 681ef03View commit details
Commits on Nov 12, 2021
-
Update error handling to provide cross platform error codes (start wi…
…th Mac) 1. Make the error a structure with a code and a cause (underlying error). 2. Set the code whenever an error is constructed. 3. Provide the underlying error when there is one. This work only on Mac for now.
Configuration menu - View commit details
-
Copy full SHA for 43475c2 - Browse repository at this point
Copy the full SHA 43475c2View commit details
Commits on Nov 13, 2021
-
Get windows and linux onto the new error handling.
Also stopped surfacing the underlying encoding errors, because they can be in both utf8 and utf16 depending on platform, and that doesn't allow for a platform-independent interface.
Configuration menu - View commit details
-
Copy full SHA for da5f00c - Browse repository at this point
Copy the full SHA da5f00cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b8a0c4 - Browse repository at this point
Copy the full SHA 0b8a0c4View commit details -
Merge branch 'master' into error-handling-improvements
Merge upstream master to pick up latest release.
Configuration menu - View commit details
-
Copy full SHA for 762bf23 - Browse repository at this point
Copy the full SHA 762bf23View commit details
Commits on Nov 14, 2021
-
Finish error work and credential improvements.
* Add analysis of the errors on each platform. This fixes #65 and #39 and #54. * Change the encoding error to have the raw bytes that couldn't be encoded. This means we get the same treatment for both UTF-16 and UTF-8 errors. This fixes #53. * Rename `PlatformIdentity` to `PlatformCredential` to make clear what it represents. * Update the README and make the code in it be a doctest so it stays up to date. This fixes #28. * Extend `PlatformCredential` so that it has all the attributes in the credential that we set. * Change `get_password` to use a mutable clone of the platform credential and have it fill all the fields of the credential from the keychain. * Add a variant of `get_password` called `get_password_and_credential` that hands back the platform credential so the client can read all the values. This fixes #60 including the enhancements requested by @1Dragoon. What's left to do before we can release this? 1. A lot more tests, especially of error conditions. I'd like to get to 95% automated coverage or better. 2. Tests using custom credential mappers for various conditions. 3. A lot of documentation for all the new features. I think we are just about ready for a beta release, though.
Configuration menu - View commit details
-
Copy full SHA for 5ff53c7 - Browse repository at this point
Copy the full SHA 5ff53c7View commit details -
Fix typo; improve example code.
1. There was a missing method in the decode_error function on Mac. 2. Improve the examples to show how errors are described.
Configuration menu - View commit details
-
Copy full SHA for 993906a - Browse repository at this point
Copy the full SHA 993906aView commit details -
Fix typo; improve example code.
1. There was a missing method in the decode_error function on Mac. 2. Improve the examples to show how errors are described.
Configuration menu - View commit details
-
Copy full SHA for 3d16934 - Browse repository at this point
Copy the full SHA 3d16934View commit details -
Further fixups and enhancements on Mac
1. Remove use of bytes crate, so no general depedencies. 2. Add the keychain domain to the MacCredential, so the user can specify the use of System and Common (and Dynamic) keychains.
Configuration menu - View commit details
-
Copy full SHA for 0a3cc66 - Browse repository at this point
Copy the full SHA 0a3cc66View commit details -
Apply last commit changes to Win and Linux
1. removed use of Bytes dependency 2. fixed a Windows bug around strings from null pointers.
Configuration menu - View commit details
-
Copy full SHA for 107c851 - Browse repository at this point
Copy the full SHA 107c851View commit details
Commits on Nov 15, 2021
-
Review changes and match Linux to Mac.
1. Add the ability to specify non-default keychains on Linux. 2. Fix typo in README. 3. Show how to use destructuring in the example to check for a particular code in the return value.
Configuration menu - View commit details
-
Copy full SHA for e286c76 - Browse repository at this point
Copy the full SHA e286c76View commit details
Commits on Nov 16, 2021
-
Restructure errors, do renames, and finish docs.
1. Turned the Error type back into an enum, with underlying platform errors attached to the error codes which indicate a runtime error in the platform. This really simplified code in a lot of places, and will make it a lot easier for clients to upgrade. 2. Renamed `Keyring` to `Entry`, since that structure really is one entry in the (global) key ring. So now you say `keyring::Entry::new(...)` to create a new entry. 3. Renamed the `attrs` module to `credential` since that's actually what it's about. 4. Completed a full draft of the code-level documentation. Once the tests are expanded, this should be ready to release.
Configuration menu - View commit details
-
Copy full SHA for ddf7b01 - Browse repository at this point
Copy the full SHA ddf7b01View commit details
Commits on Nov 18, 2021
-
1. Move integration tests to a separate file. 2. Add unit tests for targets. 3. Add integration tests for target stability.
Configuration menu - View commit details
-
Copy full SHA for 543f7c5 - Browse repository at this point
Copy the full SHA 543f7c5View commit details
Commits on Nov 19, 2021
-
1. make default_mapper have the CredentialMapper signature. 2. add unit tests for input and output validation on Windows.
Configuration menu - View commit details
-
Copy full SHA for 1bcadf9 - Browse repository at this point
Copy the full SHA 1bcadf9View commit details -
1. refactor map to use a function for decoding passwords. 2. add encoding error tests on Mac.
Configuration menu - View commit details
-
Copy full SHA for f5737d2 - Browse repository at this point
Copy the full SHA f5737d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60b607b - Browse repository at this point
Copy the full SHA 60b607bView commit details
Commits on Nov 21, 2021
-
A lot of cleanup based on usage.
1. Reworked the CLI example to have much better error messages, allow keychain switching, etc. 2. Based on that rework, revisit the notion of "credential mappers" and change to allowing direct specification of the platform credential for a keyring entry. This simplified a ton of things, and avoided the whole question of passing closures into the entry creation process. 3. Having gotten rid of custom mappers, introduce a new constructor to specify a keychain as well as a service and a username. 4. Simplified the tests to match the simplified interface.
Configuration menu - View commit details
-
Copy full SHA for 56051c9 - Browse repository at this point
Copy the full SHA 56051c9View commit details -
Rename working cli example back to cli.
I had considered making this example a binary rather than an example, so that it was always available with the package, but the Rust folks haven't figured out the dependency hell around this yet, so I'm saying with it as an example and leaving it published under its current name.
Configuration menu - View commit details
-
Copy full SHA for 39771fc - Browse repository at this point
Copy the full SHA 39771fcView commit details
Commits on Nov 22, 2021
-
Also remove the `clap` dependency, now that we are using structopt.
Configuration menu - View commit details
-
Copy full SHA for 01ebb89 - Browse repository at this point
Copy the full SHA 01ebb89View commit details -
Remove serial testing restriction.
Now that each of the tests uses a separate credential, there is no collision between testing threads.
Configuration menu - View commit details
-
Copy full SHA for 1c680a3 - Browse repository at this point
Copy the full SHA 1c680a3View commit details
Commits on Nov 24, 2021
-
Clean up based on usage and experimentation.
1. Rename `new_in_keychain` to `new_with_target` and use the target on all platforms. 2. Enhacen tests to test the new functionality. 3. Revamp the CLI example to use new functionality, maintaining backward compatibility. 4. Revamp the docs and the readme to talk about what happens on each platform. 5. Test to make sure there is backward compatibility with earlier releases.
Configuration menu - View commit details
-
Copy full SHA for 9964e87 - Browse repository at this point
Copy the full SHA 9964e87View commit details