Raul Ochoa
fa8b27231c
Removed unused/old template lock functionality
2015-02-04 19:36:16 +01:00
Raul Ochoa
efe090f5b0
Accept 'open' string in templated auth
as authorized
2015-01-28 17:29:50 +01:00
Raul Ochoa
6ab6fd91e4
Merge pull request #248 from CartoDB/196-validate-layergroup-in-named-maps
...
Basic layergroup validation on named map creation/update
2015-01-26 17:04:48 +01:00
Raul Ochoa
e690170689
More exhaustive layergroup validation:
...
- layers is an array and it's not empty
- layers has at least options
2015-01-26 15:51:10 +01:00
Raul Ochoa
11d9f5dd76
Basic layergroup validation on named map creation/update
2015-01-23 18:24:25 +01:00
Raul Ochoa
f5a3b77737
Make TemplateMaps to emit messages when adding/updating/deleting templates
2015-01-23 16:35:47 +01:00
Raul Ochoa
20eb92a3b1
Remove signedmaps and locks functionality as it is no longer needed
2015-01-22 19:28:59 +01:00
Raul Ochoa
8d22ed7594
Tests to validate template instantiation returns new instances with
...
default values if they are missing.
2015-01-22 18:38:42 +01:00
Raul Ochoa
e8ab3a48c6
Removes TemplateMaps dependency on SignedMaps
...
- Token validation is done against the template
- Template is always extended with default values for auth and placeholders
- MapConfig is extended, in order to validate auth_toknes, with template info:
- template name
- template auth
- No more locks to create, update or delete templates
- Trusting in redis' hash semantics
- Some tradeoffs:
* A client having more templates than allowed by a race condition
between limit (HLEN) check and creation (HSET)
* Updating a template could happen while the deleting it, resulting in
in a new template
* Templates already instantiated will be accessible thrught their
layergroup so it is possible to continue requesting tiles/grids/etc.
- Authorization is now handled by template maps
2015-01-22 15:40:40 +01:00
Raul Ochoa
b4bee864d2
Lock now considers the creation time and compares against a ttl so
...
a lock is not keep forever in case of failure.
Pending: lazy removal of expired locks.
2014-09-25 19:00:35 +02:00
Raul Ochoa
3e571b4ce8
Use object.keys to iterate over objects
2014-09-25 12:17:32 +02:00
Raul Ochoa
fb8fd5121e
Do not expose internal implementation
2014-09-25 12:16:34 +02:00
Raul Ochoa
ac2a3243b5
Don't cache regexes and avoid the _re hack
2014-09-25 12:04:52 +02:00
Raul Ochoa
1c10b8193b
Adds dot to compile templates
2014-09-24 19:17:51 +02:00
Raul Ochoa
abf0fa1b32
Remove unused var
2014-09-24 19:12:43 +02:00
Raul Ochoa
4c5bc13c7f
Check style fixes
2014-09-24 19:11:53 +02:00
Sandro Santilli
e4cd37647e
Allow limiting number of allowed user templates
...
Adds maxUserTemplates directive.
Closes #136
2014-02-13 14:55:31 +01:00
Sandro Santilli
747f4803ba
Include hash of template in the maptoken returned from instanciation
...
Doing so basically removes the need to include the template identifier
in the surrogate keys of the responses for resources fetched via
the instance whenever template is updated. See #105
2014-02-10 15:30:35 +01:00
Sandro Santilli
399bed34ad
Do not try to replace template variables in undefined elements
...
See #133
2014-02-10 11:26:21 +01:00
javi
f5e0d06e2f
fixed when default value in a template attribute is a number and type = number checking fails fixed #130
2014-02-06 17:45:48 +01:00
javi
78f69d5236
template variables with spaces are not replaced correctly fixed #129
2014-02-06 17:33:26 +01:00
Sandro Santilli
b4936ffafa
Do not allow creating template with auth='token' and no valid tokens
...
Closes #128
Includes acceptance test for both creation and update
2014-02-06 12:24:14 +01:00
Sandro Santilli
ef3733aebe
Improve error on attempt to delete missing template
2013-12-20 12:54:38 +01:00
Sandro Santilli
0f90d687c7
Implement signed teplate maps
...
Closes #98
Raises minimum required redis version to 2.4.0+ (Debian stable has 2.4.14)
2013-12-17 17:39:21 +01:00