Daniel Nephin
28866e48ad
state: remove duplication in acl tables schema
2021-03-29 14:21:27 -04:00
Daniel Nephin
c6a1ca701d
state: reduce duplication in catalog table schema
2021-03-29 14:21:23 -04:00
Daniel Nephin
d9dacb8388
state: share more indexer functions for config_entries
2021-03-29 14:21:20 -04:00
Daniel Nephin
f303120f2d
state: remove old schema test
...
This test has been replaced by TestNewDBSchema_Indexers
2021-03-29 14:21:13 -04:00
Daniel Nephin
150decff2a
state: use addNamespaceIndex again
2021-03-29 14:21:02 -04:00
Daniel Nephin
4a3b462c28
Merge pull request #9911 from hashicorp/dnephin/state-index-acl-roles
...
state: convert ACLRoles policies index to new functional indexer pattern
2021-03-24 18:28:19 -04:00
Daniel Nephin
25b791ba47
state: add tests for checks.ID indexer
2021-03-22 18:06:43 -04:00
Daniel Nephin
abbe5c3701
state: use tx.First instead of tx.FirstWatch
...
Where appropriate. After removing the helper function a bunch of these calls can
be changed to tx.First.
2021-03-22 18:06:33 -04:00
Daniel Nephin
49938bc472
state: convert checks.ID index to new pattern
2021-03-22 18:06:08 -04:00
Daniel Nephin
1d3fe64bba
state: use uuid for acl-roles.policies index
...
Previously we were encoding the UUID as a string, but the index it references uses a UUID
so this index can also use an encoded UUID to save a bit of memory.
2021-03-19 19:45:37 -04:00
Daniel Nephin
3c01bb1156
state: convert acl-roles.policies index to new pattern
2021-03-19 19:45:37 -04:00
Daniel Nephin
474e95b9f5
state: convert acl-roles.name index to the functional indexer pattern
2021-03-19 19:45:37 -04:00
Daniel Nephin
f836ed256b
state: add indexer tests for acl-roles table
2021-03-19 19:45:37 -04:00
Daniel Nephin
6bc2c0e1ce
state: use constants for acl-roles table and indexes
2021-03-19 19:45:37 -04:00
Daniel Nephin
d4e02024fe
state: convert acl-policies table to new pattern
2021-03-19 15:24:00 -04:00
Daniel Nephin
845a10354e
state: use constants and add tests for acl-policies table
2021-03-19 15:19:57 -04:00
Daniel Nephin
f6533a08f8
state: add indexer test for services.ID index
2021-03-19 14:13:14 -04:00
Daniel Nephin
1d1c03d0cd
state: handle wildcard for services.ID index
...
When listing services, use the id_prefix directly if wildcards are allowed.
Error if a wildcard is used for a query that does not index the wildcard
2021-03-19 14:12:19 -04:00
Daniel Nephin
bae69b2352
state: fix prefix index with the new pattern
...
Prefix queries are generally being used to match part of a partial
index. We can support these indexes by using a function that accept
different types for each subset of the index.
What I found interesting is that in the generic StringFieldIndexer the
implementation for PrefixFromArgs would remove the trailing null, but
at least in these 2 cases we actually want a null terminated string.
We simply want fewer components in the string.
2021-03-19 14:12:17 -04:00
Daniel Nephin
ec50454fb3
state: move services.ID to new pattern
2021-03-19 14:11:59 -04:00
Daniel Nephin
f5a52a4501
state: add tests for gateway-service table indexers
2021-03-18 12:09:42 -04:00
Daniel Nephin
66632538d8
state: use constants and remove wrapping
...
for GatewayServices table
2021-03-18 12:08:59 -04:00
Daniel Nephin
d77bdd26c5
state: Move UpstreamDownstream to state package
2021-03-18 12:08:59 -04:00
Daniel Nephin
ca3686f4aa
state: add tests for mesh-topology table indexers
2021-03-18 12:08:57 -04:00
Daniel Nephin
8a1a11814d
state: use constants for mesh-topology table operations
2021-03-18 12:08:03 -04:00
Freddy
28c29e6ab4
Merge pull request #9899 from hashicorp/wildcard-ixn-oss
...
Add methods to check intention has wildcard src or dst
2021-03-18 08:33:07 -06:00
freddygv
1c46470a29
Add methods to check intention has wildcard src or dst
2021-03-17 22:15:48 -06:00
freddygv
6c43195e2a
Merge master and fix upstream config protocol defaulting
2021-03-17 21:13:40 -06:00
freddygv
0c8b618ca0
Temporarily silence spurious wakeup. Addressing false positive in beta.
2021-03-17 17:25:29 -06:00
freddygv
60690cf5c9
Merge remote-tracking branch 'origin/master' into intention-topology-endpoint
2021-03-17 17:14:38 -06:00
freddygv
d19a5830dd
Do not include consul as upstream or downstream
2021-03-17 13:40:04 -06:00
Daniel Nephin
d2591312f8
state: add tests for config-entry indexers
2021-03-17 14:41:46 -04:00
Daniel Nephin
1b8f8b135e
state: convert config-entries kind index to new pattern
2021-03-17 14:40:57 -04:00
Daniel Nephin
bfcf463c3a
state: remove config-entries namespace index
...
Use a prefix of the ID index instead.
2021-03-17 14:40:57 -04:00
Daniel Nephin
dcbb1ba5dd
state: remove unnecessary method receiver
2021-03-17 14:40:57 -04:00
Daniel Nephin
b43977423f
state: convert config-entries table to new indexer pattern
...
Using functional indexes to isolate enterprise differentiation and
remove reflection.
2021-03-17 14:40:57 -04:00
Daniel Nephin
98c32599e4
Merge pull request #9881 from hashicorp/dnephin/state-index-service-check-nodes
...
state: convert services.node and checks.node indexes
2021-03-17 14:12:02 -04:00
Daniel Nephin
b771baa1f5
Merge pull request #9863 from hashicorp/dnephin/config-entry-kind-name
...
state: move ConfigEntryKindName
2021-03-17 14:09:39 -04:00
Daniel Nephin
0b3930272d
state: convert services.node and checks.node indexes
...
Using NodeIdentity to share the indexes with both.
2021-03-16 13:00:31 -04:00
freddygv
b79039c21c
Prefix match type vars to match use
2021-03-16 09:49:24 -06:00
freddygv
fed983fe9a
Pass txn into service list queries
2021-03-16 09:33:08 -06:00
freddygv
26ba0c0fc8
Pass txn into intention match queries
2021-03-16 08:03:52 -06:00
freddygv
d7f3bcc8bb
Replace CertURI.Authorize() calls.
...
AuthorizeIntentionTarget is a generalized version of the old function,
and can be evaluated against sources or destinations.
2021-03-15 18:06:04 -06:00
freddygv
eb6c0cbea0
Fixup typo, comments, and regression
2021-03-15 17:50:47 -06:00
freddygv
e4e14639b2
Add state store function for intention upstreams
2021-03-15 08:50:35 -06:00
freddygv
4976c000b7
Refactor IntentionDecision
...
This enables it to be called for many upstreams or downstreams of a
service while only querying intentions once.
Additionally, decisions are now optionally denied due to L7 permissions
being present. This enables the function to be used to filter for
potential upstreams/downstreams of a service.
2021-03-15 08:50:35 -06:00
Daniel Nephin
2a53b8293a
proxycfg: use rpcclient/health.Client instead of passing around cache name
...
This should allow us to swap out the implementation with something other
than `agent/cache` without making further code changes.
2021-03-12 11:46:04 -05:00
Daniel Nephin
c33570be34
catalog_events: set the right key for connect snapshots
2021-03-12 11:35:43 -05:00
Daniel Nephin
e2215d9f0f
rpcclient: use streaming for connect health
2021-03-12 11:35:42 -05:00
freddygv
b98abb6f09
Update server-side config resolution and client-side merging
2021-03-10 21:05:11 -07:00