mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
feat(elasticache): support cache parameter groups (#2392)
* feat(elasticache): support cache parameter groups CreateCacheParameterGroup was unsupported, so a Redis module that sets any parameter could not apply at all — most set at least maxmemory-policy. The describe was a stub that answered with an empty list whatever was asked of it. Adds the group surface over the Query protocol: - CreateCacheParameterGroup, DescribeCacheParameterGroups, ModifyCacheParameterGroup, DescribeCacheParameters, DeleteCacheParameterGroup - ListTagsForResource for a parameter group ARN, without which the tags a create carries would be stored and never readable - the default.* groups AWS publishes for all 13 families, derived rather than stored: nothing can modify or delete them, so persisting them would only add records to migrate and a writer to race Taken from a live account: the create response and its ARN, IsGlobal, and the error each rejection carries — CacheParameterGroupAlreadyExists for a duplicate, CacheParameterGroupNotFound for an unknown group, and the identifier rule that rejects a name containing a dot, which is also how AWS refuses to delete a default group. Each writer takes one monitor keyed by the group name before it reads. Guarding the record cannot serve a create, which has no record yet, so two of them would both pass the existence check; and a modify that resolved its record before locking would write back a group a concurrent delete had removed. floci does not carry AWS's per-family catalogue of parameter names, so it stores what a caller sets and reports it with source "user". Rejecting names missing from a partial catalogue would refuse configurations AWS accepts, so nothing is rejected on that basis, and a request for system parameters returns none rather than reporting user parameters under another source. * fix(elasticache): answer tags for the ARN that was asked about ListTagsForResource read the trailing name out of the ARN and ignored the rest, so an ARN naming another account or region was answered with this caller's group of the same name — a response describing a different resource than the request identified. The ARN is now checked before it is used, with the errors AWS gives for each: InvalidARN for a string that is not seven components, "Unauthorized call. Please check the region or customer id" for another region, "The resource ARN does not belong to the caller's account." for another account, and "<name> is not present" for a group that does not exist, which is worded differently from the describe's not-found. Tightening the tolerated exception in the race test, as review asked, turned up a second problem: a modify whose group had been deleted reported "is a default group and cannot be modified", because absence from the store was read as proof of a published default. The two are now told apart, and both errors are asserted directly rather than only when the race happens to expose them. * fix(elasticache): check every component of a tag ARN, not only region and account An ARN in another service's namespace was accepted as long as its region and account matched, so arn:aws:rds:<region>:<account>:parametergroup:<name> was answered with the ElastiCache group of that name — tags for a resource the caller did not ask about. The partition and service are checked too, with the errors AWS gives: "partition field is wrong. Expected value is aws" and "service field is wrong. Expected value is elasticache". * fix(elasticache): word each parameter group not-found the way AWS words it Three actions, three sentences on a live account. Delete omits the space after the type name — that is verbatim, and the line now says so, because it reads like a typo and the next person to tidy it would silently stop matching AWS. Modify was the one that was actually wrong: it answered with describe's sentence. A live account words it "CacheParameterGroup not found: <name>", which is neither describe's nor delete's. Pinned by a test that asserts all three, so the odd one cannot be quietly aligned with the others.
This commit is contained in:
1 parent
f8b07a78ff
commit
6b628179f3
7 files changed
+937
-5
No files matched your search
+157
@@ -0,0 +1,157 @@
|
||||
package io.github.hectorvent.floci.services.elasticache;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.github.hectorvent.floci.core.common.AwsException;
|
||||
import io.github.hectorvent.floci.services.elasticache.model.CacheParameterGroup;
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import jakarta.inject.Inject;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* The write paths of a cache parameter group: only one create of a name can win, a modify cannot
|
||||
* restore a group deleted alongside it, and a stored group survives being written and read back.
|
||||
*/
|
||||
@QuarkusTest
|
||||
class CacheParameterGroupConcurrencyTest {
|
||||
|
||||
@Inject
|
||||
ElastiCacheService service;
|
||||
|
||||
@Test
|
||||
void onlyOneConcurrentCreateOfANameSucceeds() {
|
||||
// Without a lock held across the existence check and the write, both creates see no group
|
||||
// and both succeed, so a duplicate never reports one.
|
||||
String name = "concurrent-create-pg";
|
||||
var pool = Executors.newFixedThreadPool(8);
|
||||
var start = new CountDownLatch(1);
|
||||
var created = new AtomicInteger();
|
||||
var rejected = new AtomicInteger();
|
||||
try {
|
||||
List<Future<Object>> attempts = java.util.stream.IntStream.range(0, 8)
|
||||
.mapToObj(i -> pool.submit(() -> {
|
||||
start.await();
|
||||
try {
|
||||
service.createCacheParameterGroup(name, "redis7", "concurrent", Map.of());
|
||||
created.incrementAndGet();
|
||||
} catch (AwsException e) {
|
||||
assertEquals("CacheParameterGroupAlreadyExists", e.getErrorCode());
|
||||
rejected.incrementAndGet();
|
||||
}
|
||||
return null;
|
||||
}))
|
||||
.toList();
|
||||
start.countDown();
|
||||
for (Future<Object> attempt : attempts) {
|
||||
attempt.get(30, TimeUnit.SECONDS);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new AssertionError(e);
|
||||
} finally {
|
||||
pool.shutdownNow();
|
||||
}
|
||||
|
||||
assertEquals(1, created.get(), "more than one create of the same name was accepted");
|
||||
assertEquals(7, rejected.get());
|
||||
service.deleteCacheParameterGroup(name);
|
||||
}
|
||||
|
||||
@Test
|
||||
void aModifyCannotRestoreAGroupThatWasDeleted() throws Exception {
|
||||
// The modify reads its record inside the lock, so a delete that got there first leaves it
|
||||
// with nothing to write back.
|
||||
String name = "modify-delete-race-pg";
|
||||
var pool = Executors.newFixedThreadPool(2);
|
||||
try {
|
||||
for (int attempt = 0; attempt < 40; attempt++) {
|
||||
service.createCacheParameterGroup(name, "redis7", "race", Map.of());
|
||||
var start = new CountDownLatch(1);
|
||||
|
||||
Future<?> modify = pool.submit(() -> {
|
||||
start.await();
|
||||
try {
|
||||
service.modifyCacheParameterGroup(name, Map.of("maxmemory-policy", "allkeys-lru"));
|
||||
} catch (AwsException e) {
|
||||
// Losing the race is a legitimate outcome, but only with this error: any
|
||||
// other one would be a real failure hiding inside the tolerated case.
|
||||
assertEquals("CacheParameterGroupNotFound", e.getErrorCode(),
|
||||
"modify losing the race to delete reported " + e.getErrorCode()
|
||||
+ ": " + e.getMessage());
|
||||
}
|
||||
return null;
|
||||
});
|
||||
Future<?> delete = pool.submit(() -> {
|
||||
start.await();
|
||||
service.deleteCacheParameterGroup(name);
|
||||
return null;
|
||||
});
|
||||
|
||||
start.countDown();
|
||||
modify.get(30, TimeUnit.SECONDS);
|
||||
delete.get(30, TimeUnit.SECONDS);
|
||||
|
||||
AwsException gone = assertThrows(AwsException.class,
|
||||
() -> service.requireParameterGroup(name),
|
||||
"the deleted parameter group was restored by a concurrent modify");
|
||||
assertEquals("CacheParameterGroupNotFound", gone.getErrorCode());
|
||||
}
|
||||
} finally {
|
||||
pool.shutdownNow();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void modifyReportsWhichThingIsActuallyWrong() {
|
||||
// Absent from the store covers two different situations, and the race test only sees the
|
||||
// second one when it happens to lose the race, so both are asserted directly here.
|
||||
service.createCacheParameterGroup("gone-pg", "redis7", "deleted below", Map.of());
|
||||
service.deleteCacheParameterGroup("gone-pg");
|
||||
|
||||
AwsException deleted = assertThrows(AwsException.class,
|
||||
() -> service.modifyCacheParameterGroup("gone-pg", Map.of("maxmemory-policy", "noeviction")));
|
||||
assertEquals("CacheParameterGroupNotFound", deleted.getErrorCode(),
|
||||
"a group that was deleted must not be reported as a default group");
|
||||
|
||||
AwsException published = assertThrows(AwsException.class,
|
||||
() -> service.modifyCacheParameterGroup("default.redis7", Map.of("maxmemory-policy", "noeviction")));
|
||||
assertEquals("InvalidParameterValue", published.getErrorCode());
|
||||
assertTrue(published.getMessage().contains("default group"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void aGroupSurvivesBeingWrittenAndReadBack() throws Exception {
|
||||
// The records are persisted as JSON, so what a restart reloads has to carry the parameters
|
||||
// and tags that were set — and a record written before either field existed still has to
|
||||
// load.
|
||||
ObjectMapper mapper = new ObjectMapper().findAndRegisterModules();
|
||||
CacheParameterGroup group = new CacheParameterGroup("persisted-pg", "redis7", "persisted");
|
||||
group.setParameters(new java.util.LinkedHashMap<>(Map.of("maxmemory-policy", "allkeys-lru")));
|
||||
group.setTags(new java.util.LinkedHashMap<>(Map.of("env", "prod")));
|
||||
|
||||
Map<String, CacheParameterGroup> reloaded = mapper.readValue(
|
||||
mapper.writeValueAsString(Map.of("persisted-pg", group)),
|
||||
new TypeReference<Map<String, CacheParameterGroup>>() {});
|
||||
|
||||
CacheParameterGroup restored = reloaded.get("persisted-pg");
|
||||
assertEquals("redis7", restored.getFamily());
|
||||
assertEquals("allkeys-lru", restored.getParameters().get("maxmemory-policy"));
|
||||
assertEquals("prod", restored.getTags().get("env"));
|
||||
|
||||
CacheParameterGroup legacy = mapper.readValue(
|
||||
"{\"name\":\"old-pg\",\"family\":\"redis7\"}", CacheParameterGroup.class);
|
||||
assertTrue(legacy.getParameters().isEmpty(), "a record without parameters must load with none");
|
||||
assertTrue(legacy.getTags().isEmpty(), "a record without tags must load with none");
|
||||
}
|
||||
}
|
||||
+297
@@ -0,0 +1,297 @@
|
||||
package io.github.hectorvent.floci.services.elasticache;
|
||||
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
|
||||
/**
|
||||
* Cache parameter groups over the Query protocol.
|
||||
*
|
||||
* <p>Behaviour follows a live account: the create response and its ARN, the error each rejection
|
||||
* carries, and the {@code default.*} groups AWS publishes. What floci does not carry is AWS's
|
||||
* per-family catalogue of parameter names, so it stores what a caller sets and reports it as
|
||||
* {@code user} — rejecting names absent from a partial catalogue would refuse configurations AWS
|
||||
* accepts.
|
||||
*/
|
||||
@QuarkusTest
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
class ElastiCacheParameterGroupIntegrationTest {
|
||||
|
||||
private static final String GROUP = "int-test-pg";
|
||||
// The router picks the service out of the credential scope, so every request carries it.
|
||||
private static final String AUTH_HEADER =
|
||||
"AWS4-HMAC-SHA256 Credential=test/20260412/us-east-1/elasticache/aws4_request";
|
||||
|
||||
private static io.restassured.specification.RequestSpecification query(String action) {
|
||||
return given()
|
||||
.header("Authorization", AUTH_HEADER)
|
||||
.formParam("Action", action)
|
||||
.formParam("Version", "2015-02-02");
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(1)
|
||||
void createReturnsTheGroupAndItsArn() {
|
||||
query("CreateCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", GROUP)
|
||||
.formParam("CacheParameterGroupFamily", "redis7")
|
||||
.formParam("Description", "integration test")
|
||||
.formParam("Tags.Tag.1.Key", "env")
|
||||
.formParam("Tags.Tag.1.Value", "prod")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<CacheParameterGroupName>" + GROUP + "</CacheParameterGroupName>"))
|
||||
.body(containsString("<CacheParameterGroupFamily>redis7</CacheParameterGroupFamily>"))
|
||||
.body(containsString("<IsGlobal>false</IsGlobal>"))
|
||||
.body(containsString(":parametergroup:" + GROUP + "</ARN>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(2)
|
||||
void duplicateIsRejected() {
|
||||
query("CreateCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", GROUP)
|
||||
.formParam("CacheParameterGroupFamily", "redis7")
|
||||
.formParam("Description", "again")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(400)
|
||||
.body(containsString("CacheParameterGroupAlreadyExists"))
|
||||
// The Query protocol answers in XML; a JSON error here would be unparseable to an SDK.
|
||||
.body(containsString("<Error>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(2)
|
||||
void anUnknownFamilyIsRejected() {
|
||||
query("CreateCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", "bad-family-pg")
|
||||
.formParam("CacheParameterGroupFamily", "redis99")
|
||||
.formParam("Description", "x")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(400)
|
||||
.body(containsString("not a valid parameter group family"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(2)
|
||||
void anInvalidNameIsRejected() {
|
||||
for (String invalid : new String[]{"1leading-digit", "trailing-", "double--hyphen", "has.dot"}) {
|
||||
query("CreateCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", invalid)
|
||||
.formParam("CacheParameterGroupFamily", "redis7")
|
||||
.formParam("Description", "x")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(400)
|
||||
.body(containsString("not a valid identifier"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(3)
|
||||
void modifyStoresTheParametersAndDescribeReportsThem() {
|
||||
query("ModifyCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", GROUP)
|
||||
.formParam("ParameterNameValues.ParameterNameValue.1.ParameterName", "maxmemory-policy")
|
||||
.formParam("ParameterNameValues.ParameterNameValue.1.ParameterValue", "allkeys-lru")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<CacheParameterGroupName>" + GROUP + "</CacheParameterGroupName>"));
|
||||
|
||||
query("DescribeCacheParameters")
|
||||
.formParam("CacheParameterGroupName", GROUP)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<ParameterName>maxmemory-policy</ParameterName>"))
|
||||
.body(containsString("<ParameterValue>allkeys-lru</ParameterValue>"))
|
||||
.body(containsString("<Source>user</Source>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(3)
|
||||
void describeParametersHonoursTheSourceFilter() {
|
||||
// floci holds no system defaults, so a request for them reports none rather than
|
||||
// returning the user's parameters under the wrong source.
|
||||
query("DescribeCacheParameters")
|
||||
.formParam("CacheParameterGroupName", GROUP)
|
||||
.formParam("Source", "system")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(not(containsString("<ParameterName>")));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(3)
|
||||
void tagsSurviveTheCreateAndAreListed() {
|
||||
query("ListTagsForResource")
|
||||
.formParam("ResourceName", "arn:aws:elasticache:us-east-1:000000000000:parametergroup:" + GROUP)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<Key>env</Key>"))
|
||||
.body(containsString("<Value>prod</Value>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(3)
|
||||
void tagsAreAnsweredForTheArnThatWasAskedAbout() {
|
||||
// Reading the trailing name alone would answer with this caller's group for an ARN naming
|
||||
// another account or region. Each rejection is the one AWS gives.
|
||||
query("ListTagsForResource")
|
||||
.formParam("ResourceName", "arn:aws:elasticache:eu-west-1:000000000000:parametergroup:" + GROUP)
|
||||
.when().post("/")
|
||||
.then()
|
||||
.statusCode(400)
|
||||
.body(containsString("Please check the region"));
|
||||
|
||||
query("ListTagsForResource")
|
||||
.formParam("ResourceName", "arn:aws:elasticache:us-east-1:111122223333:parametergroup:" + GROUP)
|
||||
.when().post("/")
|
||||
.then()
|
||||
.statusCode(400)
|
||||
.body(containsString("does not belong to the caller"));
|
||||
|
||||
query("ListTagsForResource")
|
||||
.formParam("ResourceName", "not-an-arn")
|
||||
.when().post("/")
|
||||
.then()
|
||||
.statusCode(400)
|
||||
.body(containsString("does not have 7 components"));
|
||||
|
||||
// An ARN in another service's namespace names another resource, however familiar the
|
||||
// trailing name looks.
|
||||
query("ListTagsForResource")
|
||||
.formParam("ResourceName", "arn:aws:rds:us-east-1:000000000000:parametergroup:" + GROUP)
|
||||
.when().post("/")
|
||||
.then()
|
||||
.statusCode(400)
|
||||
.body(containsString("service field is wrong"));
|
||||
|
||||
query("ListTagsForResource")
|
||||
.formParam("ResourceName", "arn:aws-cn:elasticache:us-east-1:000000000000:parametergroup:" + GROUP)
|
||||
.when().post("/")
|
||||
.then()
|
||||
.statusCode(400)
|
||||
.body(containsString("partition field is wrong"));
|
||||
|
||||
query("ListTagsForResource")
|
||||
.formParam("ResourceName", "arn:aws:elasticache:us-east-1:000000000000:parametergroup:no-such-pg")
|
||||
.when().post("/")
|
||||
.then()
|
||||
.statusCode(404)
|
||||
.body(containsString("no-such-pg is not present"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(4)
|
||||
void theDefaultGroupsArePublished() {
|
||||
query("DescribeCacheParameterGroups")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<CacheParameterGroupName>default.redis7</CacheParameterGroupName>"))
|
||||
.body(containsString("<CacheParameterGroupName>default.redis7.cluster.on</CacheParameterGroupName>"))
|
||||
.body(containsString("<CacheParameterGroupName>default.valkey8</CacheParameterGroupName>"))
|
||||
.body(containsString("<CacheParameterGroupName>" + GROUP + "</CacheParameterGroupName>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(4)
|
||||
void aDefaultGroupCannotBeModifiedOrDeleted() {
|
||||
query("ModifyCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", "default.redis7")
|
||||
.formParam("ParameterNameValues.ParameterNameValue.1.ParameterName", "maxmemory-policy")
|
||||
.formParam("ParameterNameValues.ParameterNameValue.1.ParameterValue", "noeviction")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(400);
|
||||
|
||||
// AWS rejects the delete on the identifier rule, since a name cannot contain dots.
|
||||
query("DeleteCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", "default.redis7")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(400)
|
||||
.body(containsString("not a valid identifier"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(4)
|
||||
void eachActionWordsItsNotFoundTheWayAwsWordsIt() {
|
||||
// Three actions, three different sentences on a live account — including a delete that
|
||||
// omits the space after the type name. They are pinned here so the odd one cannot be
|
||||
// tidied into the others by someone reading it as a typo.
|
||||
query("DescribeCacheParameterGroups")
|
||||
.formParam("CacheParameterGroupName", "absent-pg")
|
||||
.when().post("/")
|
||||
.then()
|
||||
.statusCode(404)
|
||||
.body(containsString("CacheParameterGroup absent-pg not found."));
|
||||
|
||||
query("ModifyCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", "absent-pg")
|
||||
.formParam("ParameterNameValues.ParameterNameValue.1.ParameterName", "maxmemory-policy")
|
||||
.formParam("ParameterNameValues.ParameterNameValue.1.ParameterValue", "noeviction")
|
||||
.when().post("/")
|
||||
.then()
|
||||
.statusCode(404)
|
||||
.body(containsString("CacheParameterGroup not found: absent-pg"));
|
||||
|
||||
query("DeleteCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", "absent-pg")
|
||||
.when().post("/")
|
||||
.then()
|
||||
.statusCode(404)
|
||||
.body(containsString("CacheParameterGroupnot found: absent-pg"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(5)
|
||||
void deleteRemovesItAndTheSecondDeleteReportsItMissing() {
|
||||
query("DeleteCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", GROUP)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
|
||||
query("DescribeCacheParameterGroups")
|
||||
.formParam("CacheParameterGroupName", GROUP)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(404)
|
||||
.body(containsString("CacheParameterGroupNotFound"));
|
||||
|
||||
query("DeleteCacheParameterGroup")
|
||||
.formParam("CacheParameterGroupName", GROUP)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(404)
|
||||
.body(containsString("CacheParameterGroupNotFound"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user