Commit Graph

180 Commits

Author SHA1 Message Date
Marcus Efraimsson 3d1c624c12 WIP: Protect against brute force (frequent) login attempts (#10031)
* db: add login attempt migrations

* db: add possibility to create login attempts

* db: add possibility to retrieve login attempt count per username

* auth: validation and update of login attempts for invalid credentials

If login attempt count for user authenticating is 5 or more the last 5 minutes
we temporarily block the user access to login

* db: add possibility to delete expired login attempts

* cleanup: Delete login attempts older than 10 minutes

The cleanup job are running continuously and triggering each 10 minute

* fix typo: rename consequent to consequent

* auth: enable login attempt validation for ldap logins

* auth: disable login attempts validation by configuration

Setting is named DisableLoginAttemptsValidation and is false by default
Config disable_login_attempts_validation is placed under security section
#7616

* auth: don't run cleanup of login attempts if feature is disabled

#7616

* auth: rename settings.go to ldap_settings.go

* auth: refactor AuthenticateUser

Extract grafana login, ldap login and login attemp validation together
with their tests to separate files.
Enables testing of many more aspects when authenticating a user.
#7616

* auth: rename login attempt validation to brute force login protection

Setting DisableLoginAttemptsValidation => DisableBruteForceLoginProtection
Configuration disable_login_attempts_validation => disable_brute_force_login_protection
#7616
2018-01-26 10:41:41 +01:00
bergquist 49673c509d fixes broken phantomjs rendering
when migrating from govendor to dep we broke the phantomjs rendering.

ref #10602
2018-01-25 13:27:24 +01:00
bergquist a4e4b76785 fixes log typo 2017-12-28 15:51:31 +01:00
bergquist b840514797 imguploader: log if the configuration is invalid 2017-12-28 15:48:19 +01:00
Carl Bergquist 35106537f2 Replace Read Only Editor role with ViewersCanEdit setting (#10166)
* removes readonly editor role

* adds viewersCanEdit setting

This enable you to allow viewers to edit/inspect
dashboards in grafana in their own browser without
allowing them to save dashboards

* remove read only editor option from all dropdowns

* migrates all read only viewers to viewers

* docs: replace readOnlyEditor with viewersCanEdit
2017-12-13 18:53:42 +01:00
bergquist 2e610cb256 dashboards as cfg: move dash/ds config files to /provisioning/* 2017-12-07 15:27:01 +01:00
bergquist 361acd3fa1 dashboards as cfg: include cfg files in dist packages 2017-12-07 15:27:01 +01:00
bergquist d69b63cbc0 dashboards as cfg: read first cfg version 2017-12-07 15:27:01 +01:00
Torkel Ödegaard aaa465a100 Merge branch 'feat-9671' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-feat-9671 2017-11-17 14:16:49 +01:00
bergquist ebbfc529e0 datasource as cfg: support globbing 2017-11-15 14:30:32 +01:00
Alexander Zobnin a0a1f4aacd dashboard history: refactor after review 2017-11-15 13:36:36 +03:00
Alexander Zobnin 08e2bbef83 dashboard history: clean up dashboard version history 2017-11-14 18:22:18 +03:00
Matt Bostock 16c5d0e4b7 Always verify TLS unless explicitly told otherwise
TLS was not being verified in a number of places:

- connections to grafana.com

- connections to OAuth providers when TLS client authentication was
  enabled

- connections to self-hosted Grafana installations when using the CLI
  tool

TLS should always be verified unless the user explicitly enables an
option to skip verification.

Removes some instances where `InsecureSkipVerify` is explicitly set to
`false`, the default, to help avoid confusion and make it more difficult
to regress on this fix by accident.

Adds a `--insecure` flag to `grafana-cli` to skip TLS verification.

Adds a `tls_skip_verify_insecure` setting for OAuth.

Adds a `app_tls_skip_verify_insecure` setting under a new `[plugins]`
section.

I'm not super happy with the way the global setting is used by
`pkg/api/app_routes.go` but that seems to be the existing pattern used.
2017-10-06 17:09:27 +01:00
Torkel Ödegaard 0c86241c5b Webpack (#9391)
* webpack poc, this is not going to work for plugins, dam

* tech: webpack and systemjs for plugins starting to work

* tech: webpack and systemjs combo starting to work

* tech: webpack + karma tests progress

* tech: webpack + karma progress

* tech: working on tests

* tech: webpack

* tech: webpack + karma, all tests pass

* tech: webpack + karma, all tests pass

* tech: webpack all tests pass

* webpack: getting closer

* tech: webpack progress

* webpack: further build refinements

* webpack: ng annotate fixes

* webpack: optimized build fix

* tech: minor fix for elasticsearch

* tech: webpack + ace editor

* tech: restored lodash move mixin compatability

* tech: added enzyme react test and upgraded to react v16

* tech: package version fix

* tech: added testdata to built in bundle

* webpack: sass progress

* tech: prod & dev build is working for the sass

* tech: clean up unused grunt stuff and moved to scripts folder

* tech: added vendor and manifest chunks, updated readme and docs

* tech: webpack finishing touches
2017-10-01 20:02:25 +02:00
Torkel Ödegaard 73563d087c feat: more work on #8768 2017-07-31 14:39:33 +02:00
Torkel Ödegaard 23558c61d4 feat: wip work on #8768 2017-07-31 13:03:42 +02:00
Anton Yackushev bab21c9069 misspell: Corrected some misspelled words 2017-06-05 15:20:34 +03:00
Torkel Ödegaard c34db77f04 grafana_com: changed name of oauth grafana_net integration (old settings names still work), and updated login button look, closes #8415 2017-05-22 14:56:50 +02:00
Mitja Z c92d719a72 added support for listening on unix socket #4030 (#8221) 2017-04-27 08:54:21 +02:00
Dan Cech b489e93d94 Config Array Syntax (#8204)
* refactor util encryption library so it doesn't have to import log

* add util.SplitString to handle space and/or comma-separated config lines

* go fmt
2017-04-25 09:14:29 +02:00
Seuf 319b8d8fca Configurable signout menu activation (#7968) 2017-03-29 11:33:28 +02:00
Torkel Ödegaard 4d4e165be7 links: updated links from grafana.net to grafana.com 2017-03-20 10:20:32 +01:00
bergquist 5dd961c0f5 settings: remove commented code 2017-02-10 07:39:26 +01:00
Torkel Ödegaard 40d39f8a3e refactor(): renaming alerting hide ui option, #7318 2017-01-25 13:32:26 +01:00
Torkel Ödegaard fee4846429 Merge branch 'alerting_ui' of https://github.com/smalik03/grafana into smalik03-alerting_ui 2017-01-25 13:16:48 +01:00
smalik 9862c9ff40 feat(alerting): Show/hide alerting UI using configuration variable
Use configuration variable "show_alerting_ui" to show/hide alerting UI
2017-01-20 10:43:29 -05:00
bergquist 06440ef57b tech(dataproxy): moves cfg to [dataproxy] 2017-01-16 12:43:59 +01:00
bergquist 839eb97061 Merge branch 'feature/dataProxyAuditLog' of https://github.com/Ricky-N/grafana into Ricky-N-feature/dataProxyAuditLog 2017-01-16 12:02:43 +01:00
Ricky Niemi 0b48e48e3d Small whitespace fix on setting file 2017-01-11 07:51:46 -08:00
Ricky Niemi 269d16301a Rename to audit logging to data proxy logging 2017-01-11 07:40:06 -08:00
Ricky Niemi 0fee7c863a Gate data proxy audit logging behind audit_logging server setting 2017-01-11 07:22:57 -08:00
Mitsuhiro Tanda 7e4c101d02 S3 IAM support (#7058)
* add s3 dependencly

* rewrite image uploader by aws-sdk-go

* improve backward compatibility of s3 image uploading

* set default for expires option

* remove acl and expires
2017-01-11 14:00:49 +01:00
Torkel Ödegaard 6e27db148c Merge branch 'authproxy_ldap' of https://github.com/seuf/grafana into seuf-authproxy_ldap 2016-12-14 21:45:15 +01:00
Seuf ae27c17c68 Auth Proxy improvements
- adds the option to use ldap groups for authorization in combination with an auth proxy
- adds an option to limit where auth proxy requests come from by configure a list of ip's
- fixes a security issue, session could be reused
2016-12-12 09:43:17 +01:00
Torkel Ödegaard 88e1d56bc2 fix(logging): added extra logging when default config file is not found (ie homepath is not correct), fixes #6829 2016-12-06 07:36:10 +01:00
bergquist ab2f109443 fix(config): error message for broken config file
closes #6731
2016-11-28 17:55:18 +01:00
Torkel Ödegaard ea5cb0d076 fix(server side rendering): Fixed address used when rendering panel via phantomjs and using non default http_addr config, fixes #6660 2016-11-23 15:35:43 +01:00
bergquist 5dea0fda51 fix(settings): remove nil pointer exception 2016-11-18 16:43:14 +01:00
Carl Bergquist 7bdedff89c feat(plugins): make sure windows data plugin path is absolute (#6264) 2016-10-13 15:36:35 +02:00
bergquist 04f417a423 feat(alerting): enabled by default. configurable elert engine
closes #6210
2016-10-10 13:09:16 +02:00
Eric Perrino d3b0905899 Added allow_sign_up setting to auth.ldap to be able to disable automatic user creation for LDAP logins (#6191) 2016-10-07 08:49:58 +02:00
Torkel Ödegaard 5f5bbfbda5 Merge branch 'master' of github.com:grafana/grafana 2016-09-28 21:12:37 +02:00
Torkel Ödegaard c28d004731 Merge branch 'go_routines' 2016-09-28 21:06:07 +02:00
Torkel Ödegaard 71e2c6f6ef refactor(backend): refactoring management of go routines in backend 2016-09-28 21:06:00 +02:00
Dan Cech 6d7061dcaf fix typo in config loader 2016-09-28 13:10:31 -04:00
Torkel Ödegaard 2750c8a801 feat(config): changed name of allow_user_login_pass to disable_login_form, changed the section of the config option to [auth], impacts merged PR #5423 2016-09-28 15:27:08 +02:00
bergquist dbb7852f21 feat: purge old files and snapshots
closes #4087
closes #2172
2016-09-26 14:33:40 +02:00
Torkel Ödegaard 23de094a81 feat(alerting/annotations): fixed broken test 2016-09-08 13:22:30 +02:00
paulroche 5ba6bab237 redact provider_config (#5915) 2016-08-27 09:50:35 +02:00
bergquist 26c6437846 Merge branch 'master' into alerting 2016-08-22 12:27:08 +02:00