Commit Graph

183 Commits

Author SHA1 Message Date
Paul Echeverri 2df57f0259 Merge branch 'master' of https://github.com/elasticsearch/elasticsearch-shield into doc-feedback
Conflicts:
	docs/structured/authentication/esusers.asciidoc
	docs/structured/authentication/ldap.asciidoc

Original commit: elastic/x-pack-elasticsearch@c270c60d27
2014-10-16 15:32:17 -07:00
c-a-m 547756f0c8 ldap: Changed default ldap behaviours
Changed URL default to ldaps and port 636.  No mode now defaults to ldap.
Added miscelleneous documentation for active directory.  Incorrect mode now
throws an exception

Original commit: elastic/x-pack-elasticsearch@0239380668
2014-10-16 15:09:10 -07:00
uboness 490409d7eb Fixes build errors around resource watching related tests
Original commit: elastic/x-pack-elasticsearch@a3614ce8c1
2014-10-16 14:40:08 -07:00
uboness 751142a600 Changed the default file watching delays to the minimum
Currently the minimum delay defaults to 5 seconds in es

Fixes elastic/elasticsearch#196

Original commit: elastic/x-pack-elasticsearch@3a99883a90
2014-10-16 13:04:07 -07:00
Paul Echeverri 9a6600a2f3 Merge branch 'doc-feedback' of https://github.com/palecur/elasticsearch-shield
Conflicts:
	docs/public/01-introduction.asciidoc
	docs/public/02-architecture.asciidoc
	docs/public/03-gettingstarted.asciidoc
	docs/public/04-administration.asciidoc

Merging PR # 160, modulo RBAC diagram.

Original commit: elastic/x-pack-elasticsearch@5eeb9d82a3
2014-10-15 16:46:32 -07:00
uboness ffeb0b4332 Changed all configuration files to be visible
Original commit: elastic/x-pack-elasticsearch@f1db8b43bb
2014-10-15 15:22:00 -07:00
javanna 97df195c02 [TEST] adapt ShieldRestTests to new users_roles format
Original commit: elastic/x-pack-elasticsearch@455a4e3fbc
2014-10-14 10:54:21 +02:00
javanna aaf1762bd6 [TEST] adapted users_roles tests to new format role:users
Original commit: elastic/x-pack-elasticsearch@d1aef6900c
2014-10-14 10:32:45 +02:00
uboness 78377c7cd2 Change users_roles format to be keyed by roles
Having roles as the keys is more aligned with the LDAP role_mapping file and with linux's group file (where the groups serve as the keys)

Also added support for comment lines (starting with `#`) in `.users` and `.users_roles` files

Original commit: elastic/x-pack-elasticsearch@60faf7330f
2014-10-13 15:10:07 -07:00
uboness 4621bb7620 Fixed the HasherTests so they'll pass under windows
Original commit: elastic/x-pack-elasticsearch@69a0a00751
2014-10-13 14:40:24 -07:00
c-a-m 858e7e9e35 users: Removed default users and user->role mappings
This will force users to create a user via the esusers
This also adds log warning when no users are found.

Original commit: elastic/x-pack-elasticsearch@3c31f8d3b0
2014-10-13 13:56:54 -06:00
c-a-m 07875c530c bug: Invalid role causing NPE
https://github.com/elasticsearch/elasticsearch-shield/issues/116

This removes null predicates that result from roles without any privileges.

Original commit: elastic/x-pack-elasticsearch@9e90237f1c
2014-10-13 10:13:18 -06:00
javanna f69c1c616a FilesUserRolesStore to return an empty array when there's no roles for a user
This prevents us from spreading the null invariant all over the place ending up with causing NPEs.

Closes elastic/elasticsearch#147

Original commit: elastic/x-pack-elasticsearch@3d5adf94ec
2014-10-13 11:26:01 +02:00
javanna 6173496a52 [TEST] fixed typo s/ingored/ignored
Original commit: elastic/x-pack-elasticsearch@7301340df8
2014-10-13 11:26:01 +02:00
uboness 5b3ae0c4d9 Added caching to allowed indices matcher
In order to prevent too many automata constructions (which can be expensive) all the time, the automatas are now cached per action/privilege (since there are limited number of those, we don't expect a cache explosion).

 Closes elastic/elasticsearch#125

Original commit: elastic/x-pack-elasticsearch@27a4e1fdbe
2014-10-10 19:26:45 +02:00
javanna f2aca1e9bc Cli tools: make sure that the status code is returned from scripts
The status code wasn't returned from java mains (always 0), also it got lost anyway within our scripts that are calling the java mains.

Relates to elastic/elasticsearch#142

Original commit: elastic/x-pack-elasticsearch@db62486605
2014-10-10 14:40:42 +02:00
javanna bad27996f9 [TEST] improved registered actions sanity check test
Shield needs to know about all the actions that are registered in core. We now check not only the external actions, meaning the classes that implement the Action interface, exposed via java api, but also all the transport handlers registered through the transport, which will contains all shard/node level actions plus the internal actions that are not exposed via java api.

We maintain two files, one for external actions, and one for the internal ones, and we check whether actions have been added or removed to/from core, to make sure we know about those changes.

Original commit: elastic/x-pack-elasticsearch@d6b68c44ee
2014-10-10 12:16:49 +02:00
Karel Minarik 5514201d4d Fixed typo in `esusers` command description
Closes elastic/elasticsearch#140

Original commit: elastic/x-pack-elasticsearch@223e76fc3f
2014-10-10 12:08:26 +02:00
javanna c20e4efe2d Improve error message when the cluster has no indices
When the indices are empty, replaced the error message `IndexMissingException[[[]] missing]` with `IndexMissingException[[[_all]] missing]`

Closes elastic/elasticsearch#138

Original commit: elastic/x-pack-elasticsearch@b590547722
2014-10-09 16:32:01 +02:00
c-a-m 7f77627396 Merge branch 'mrsolo-enhance/static'
Original commit: elastic/x-pack-elasticsearch@c62fc1e081
2014-10-07 11:07:59 -06:00
Bill Hwang 0cb46872cf [CI] Added custom pmd xml file
Add missing file

Original commit: elastic/x-pack-elasticsearch@2939191b32
2014-10-07 11:06:35 -06:00
Bill Hwang 2a1ce81960 [CI] Added static analysis dependencies
Modified pom.xml to do static analysis without Jenkins

'mvn -DskipTests=true -Pstatic clean compile site' to start analysis
The reports are at target/site/project-reports.html.

Original commit: elastic/x-pack-elasticsearch@ddec28e8d0
2014-10-07 11:06:35 -06:00
Alexander Reelsen aec86a060e incorporated review comments
Original commit: elastic/x-pack-elasticsearch@f4c8ed918f
2014-10-07 18:10:08 +02:00
Alexander Reelsen 994f785715 Logging: Stop logging closed channel exceptions by default
Original commit: elastic/x-pack-elasticsearch@c563ecaafb
2014-10-07 18:10:08 +02:00
javanna 11ff005dc3 Internal: replace wildcard expressions and _all with matching indices that the current user is authorized for
Two reasons for this:
1) automatically convert the _all to its matching indices, in the context of the current user is authorized for, instead of resolving wildcards and then throwing authorization exception because the wildcard exp matches indices that the user is not authorized for
2) this makes the wildcards resolution secure, meaning that there is a single place that resolve wildcards. If it happened in shield while authorizing and in core while actually executing the operation, there would be mismatches which would allow to execute operation on indices that the user is not authorized for, if they get created with the "right" timing.

Closes elastic/elasticsearch#54
Closes elastic/elasticsearch#105

Original commit: elastic/x-pack-elasticsearch@a02c6fbccf
2014-10-07 17:16:55 +02:00
Alexander Reelsen c02277283c Add .esvmrc file to start SSL configured cluster fast
esvm is small commandline tool to start different cluster in a fast way.
This commit adds a preconfigured .esvmrc for starting a SSL enabled cluster
in no time.

All you need to do is to build the package and run

esvm shield

This starts a two node cluster with SSL enabled on HTTP and transport

Original commit: elastic/x-pack-elasticsearch@f701fd1134
2014-10-07 17:08:53 +02:00
javanna 6f4acfa93b [TEST] customize test global cluster for REST tests only if REST tests are enabled
Closes elastic/elasticsearch#107

Original commit: elastic/x-pack-elasticsearch@55eea46460
2014-10-06 12:22:23 +02:00
Alexander Reelsen 0d702c2fbc HTTPS: Do not require client auth by default
Original commit: elastic/x-pack-elasticsearch@795d40a705
2014-10-06 09:11:53 +02:00
Alexander Reelsen fe7d79384f CLI: Fix esusers tool to not create bogus role entry
If a user was created, but the user was not supplied roles on the commandline,
a bogus 'user:' was added to the roles file. This fix checks, if roles were
supplied when creating a user and only changes the roles file in that case.

Original commit: elastic/x-pack-elasticsearch@286951c016
2014-10-06 09:09:55 +02:00
javanna 14fed747fb Restore indices authorization for composite indices requests
Original commit: elastic/x-pack-elasticsearch@64ae3bf5c1
2014-10-02 16:43:09 +02:00
javanna 5b1dd41f23 Move to elasticsearch-1.4.0.Beta1 (no snapshot)
Original commit: elastic/x-pack-elasticsearch@18c93bcae2
2014-10-02 15:42:21 +02:00
Alexander Reelsen 2e6a8e0db8 IP filtering: Removing error messages claiming to reject all connections
Original commit: elastic/x-pack-elasticsearch@2fe77515e7
2014-10-02 11:06:32 +02:00
Alexander Reelsen 464bc0a752 Ip Filtering: Change default rule to allow
In order to prevent confusion when starting up nodes (so they can join easily together)
and adding some usability connections are not denied by default on the server side.

Original commit: elastic/x-pack-elasticsearch@6ffe3a7df2
2014-10-02 09:17:00 +02:00
c-a-m a47de7539c ldap: Changed LdapSslSocketFactory method of setting the static factory, plus miscellaneous cleanup
Original commit: elastic/x-pack-elasticsearch@1e1ba2aa7d
2014-10-01 15:11:26 -06:00
c-a-m 2ed4dd7fb6 ldap: Adds OpenLdap and Active Directory tests, and refactors SSLConfig
SSLConfig is split into SSLConfig and SSLTrustConfig.

OpenLdapTests and ActiveDirectory tests connect via TLS to EC2 instances.

Original commit: elastic/x-pack-elasticsearch@ea38e58dea
2014-10-01 15:11:26 -06:00
Paul Echeverri 7788c833e0 Merge branch 'doc-draft'
Merging Issue elastic/elasticsearch#99

Original commit: elastic/x-pack-elasticsearch@4ddbcb6e30
2014-10-01 13:00:05 -07:00
Paul Echeverri a0a7b9b7ff Merge branch 'master' into doc-draft
Merging PR elastic/elasticsearch#99 per Uri

Original commit: elastic/x-pack-elasticsearch@022a898a9f
2014-10-01 12:59:20 -07:00
Paul Echeverri 5137b21742 Merge pull request elastic/elasticsearch#72 from elasticsearch/doc-draft
Draft docs for Shield

Original commit: elastic/x-pack-elasticsearch@91492a4cf6
2014-10-01 11:55:19 -07:00
Michael McCandless 3b1ae0b593 Upgrade to Lucene 4.10.1
Original commit: elastic/x-pack-elasticsearch@31273b6769
2014-10-01 05:15:49 -04:00
Alexander Reelsen 2fbf4436aa Dependencies: Updating to elasticsearch 1.4.0.Beta1
Original commit: elastic/x-pack-elasticsearch@66cc907790
2014-10-01 11:11:33 +02:00
Alexander Reelsen f5589cffb2 SSL: Added more default ciphers
Original commit: elastic/x-pack-elasticsearch@c419eccec2
2014-10-01 11:03:08 +02:00
uboness 637a9e773c Added user authentication on rest requests
The authc service will now authenticate the user on the rest layer as well, meaning there will only be a single authentication process no matter what is then entry point to ES (for example, if a rest handler executes two internal requests... like some of the _cat APIs, there'll still be a single authentication process)

 In addition, the audit logs will now log REST authentication failures such that the remote address and the rest endpoint will show up in the logs as well.

Original commit: elastic/x-pack-elasticsearch@07af440147
2014-09-30 16:51:27 +02:00
c-a-m bd38b5237c Revert "passwordfix: This removes the password clearing from the authentication service"
This reverts commit elastic/x-pack@29462b494f.

Original commit: elastic/x-pack-elasticsearch@50e42933f0
2014-09-29 10:27:16 -06:00
javanna a57eae4f1f Internal: return better error message in SecurityFilter and InternalKeyService & share signing code
Closes elastic/elasticsearch#89

Original commit: elastic/x-pack-elasticsearch@a1dcd9c5aa
2014-09-29 11:50:38 +02:00
c-a-m 402749e12b passwordfix: This removes the password clearing from the authentication service
This fixes a bug when the UsernamePasswordToken is cached in the userContext and reused after it's cleared.

Original commit: elastic/x-pack-elasticsearch@9aab1d8530
2014-09-27 11:23:38 -06:00
c-a-m da3aacf107 Passwords: SecuredString to lock down and clear password usage.
SecuredString encapsulates handling of passwords and clearing them when done.  This change
includes changing everywhere passwords are used.  After authentication the authentication service will
clear the token - which will clear the password.  This avoids using any passwords in String objects.

This also adds commentary to BCrypt to show how it changed from the original external resource.  It moves utility methods to CharArrays.

Original commit: elastic/x-pack-elasticsearch@d0ffbae5c8
2014-09-26 10:39:04 -06:00
javanna f3164f1d24 [TEST] add system key to node settings in ShieldRestTests
Original commit: elastic/x-pack-elasticsearch@76be4c240a
2014-09-26 08:44:50 +02:00
uboness b3472bf3dc Changed the base64 encoding of the signatures to be URL safe
In InternalKeyService, we encode the signatures with base64. For things like scroll id, that need to be placed in URLs it's important that the signature will be URL safe.

Original commit: elastic/x-pack-elasticsearch@138d02d966
2014-09-25 13:52:55 +02:00
javanna b99f7be199 [TEST] add docs check to ScrollIdSigningTests
Original commit: elastic/x-pack-elasticsearch@30c026ac92
2014-09-25 11:58:13 +02:00
Michael McCandless d9d5cbeb32 upgrade to Lucene 4.10.1 snapshot
Original commit: elastic/x-pack-elasticsearch@d41ba71039
2014-09-24 16:35:42 -04:00