This repository has been archived by the owner. It is now read-only.
Replace Redmine.pm with ChiliProject.pm #229
Closed
Conversation
It caches the credentials in the Rails cache in a way that they are checked at least once every 10 minutes (if supported by the used cache store).
This action can be used to check if a certain user (identified with basic auth) has a certain permission on a named project.
# The full URL to your ChiliProject instance | ||
ChiliProjectBaseUrl "http://your.server/chiliproject" | ||
# The key as enterd in your ChiliProject in |
thegcat
Jan 2, 2013
Member
Typo: enterd -> entered
Typo: enterd -> entered
$self->{ChiliProjectGitSmartHttp} = 1; | ||
} else { | ||
$self->{ChiliProjectGitSmartHttp} = 0; | ||
} |
thegcat
Jan 2, 2013
Member
How about making smart HTTP the default? I think git 1.7 is new enough for that.
How about making smart HTTP the default? I think git 1.7 is new enough for that.
meineerde
Jan 2, 2013
Author
Member
Then it won't work for svn or webdav anymore. The default is the simple stuff, i.e. to decide read or write based on the HTTP verb. That means GitSmartHttp off. With GitSmartHttp, we decide based on the the URL pattern for Git.
Then it won't work for svn or webdav anymore. The default is the simple stuff, i.e. to decide read or write based on the HTTP verb. That means GitSmartHttp off. With GitSmartHttp, we decide based on the the URL pattern for Git.
thegcat
Jan 2, 2013
Member
Mmh, I thought with GitSmartHttp both would work. How about adding a config option for the type of repo to make it more clear what it does?
Mmh, I thought with GitSmartHttp both would work. How about adding a config option for the type of repo to make it more clear what it does?
by the owner for each of your projects. | ||
- Use "http://host/git/repo", and store your credentials in the ~/.netrc | ||
file. This is the recommended solution when using Git <= 1.7.9 on the client, |
thegcat
Jan 2, 2013
Member
As the credentials-to-system-keystore bridges have also been around for long enough I'd rather not have this in the docs. Same goes for the above http://user:pass@ method.
As the credentials-to-system-keystore bridges have also been around for long enough I'd rather not have this in the docs. Same goes for the above http://user:pass@ method.
See line notes, everything else looks good. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This patch adds three new features to ChiliProject to resolve https://www.chiliproject.org/issues/177:
User.try_to_login
. It allows to cache the auth credentials in the Rails.cache (e.g. Memcached). It creates a hash from the session secret, username, and password and saves it to the cache on successful login. This hash is less secure than the default hash in the database (it is SHA1-based and salted by the session secret), it is probably sufficient for storage in a memory cache. This mode is required to use either "expensive" hashes (e.g when we switch to PBKDF2) or when using external auth sources like LDAP which are rather slow.Redmine.pm
calledChiliProject.pm
which uses the new sys API for authentication.This has several advantages as it completely removes the duplication of the complex authentication and authorization logic from the Perl module. We no longer require database modules and the code is now probably even threadsafe (allowing the usage of the Apache worker mpm).
The downside is that we use the ChiliProject for each auth request which might slow things down for very limited (or not concurrent) installs. However, each request right now takes <= 20 ms with Passenger on my systems, so it should probably be okay.
The Perl module still needs some more testing (which I would gladly take if you have some time) so I'm targeting this module for ChiliProject 3.5.