-
Notifications
You must be signed in to change notification settings - Fork 55
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
Mora Authentication #18
Comments
Sorry about replying to this issue this late. Do you think Mora should perform such authentication (it already can do Mongo auth)? Another option is put such a service in front of Mora. Apache and Nginx both could perform this task. |
I think mora is actually well performing HTTP server in it's current form and users should have an option to use authentication in it. Also it is a problem for PaaS users who doesn't always have possibility to configure loadbalancer or any intermediary server in infrastructure in such way. |
in the past, i have used HMAC to protect an Api. Kind of the way Amazon AWS On Monday, March 10, 2014, Łukasz Kurowski notifications@github.com wrote:
^ Ernest Micklei |
Yes, I think we should provide few basic filters which could be enabled in configuration file. Example config section: mora.filters = basic_auth,other_defined
mora.filters.basic_auth.username = admin
mora.filters.basic_auth.password = password example implementation var registeredFilers map[string](func(p properties.Properties) func(req *restful.Request, resp *restful.Response))
func init() {
// basic authentication filter
registeredFilters["basic_auth"] = func(p properties.Properties) func(req *restful.Request, resp *restful.Response) {
var (
username = p.GetString("username", "")
password = p.GetString("password", "")
)
return func(req *restful.Request, resp *restful.Response) {
// authenticate here
}
}
}
func initializeRouter() { //proto
filters := strings.Split(props.GetString("mora.filters"), ",")
for _, name := range filters {
if filter := registeredFilters[name]; filter != nil {
fn := filter(props.SelectProperties(fmt.Sprintf("mora.filters.%s", name)))
route.Filter(fn)
}
}
} |
good idea to have filter implementations and let users configure their The hard part is to think about what filters to offer. On Monday, March 10, 2014, Łukasz Kurowski notifications@github.com wrote:
^ Ernest Micklei |
I think just basic auth should be fine for now. IMO we should create a new directory which will contain one filter per file so it would be easy to make a new one for any contributor without digging into any additional code. |
Along the vision of the new structure, we could have a subpkg contains auth method implementations. |
Hey, I'd like to have some authentication options for mora API usage.
I think it should be some out-of mongo, distributable authentication service, maybe Keystone (api docs) which is common choice in public and private clouds today as it's part of popular and strong OpenStack.
I would like to hear other options and opinions about them, and maybe some voices against my word because Keystone was just a shot.
The text was updated successfully, but these errors were encountered: