mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(s3): honor bucket-policy grants on presigned POST uploads (#4278)
A presigned POST was authorized against the signing principal's identity policies alone, so a same-account caller that only the bucket policy named was denied. The IAM filter now resolves the applicable resource policies on that path too, letting either policy provide the grant while an explicit deny in either still wins and cross-account access still requires both. That resolution now also carries the global condition keys (aws:PrincipalAccount, aws:ResourceAccount, aws:RequestedRegion) filter() already supplies for every other enforcement path, instead of only aws:PrincipalArn, so a conditional bucket-policy statement is judged consistently between the two enforcement paths. Per-action, header-derived keys (s3:RequestObjectTag/* from x-amz-tagging) are deliberately not resolved here: a presigned POST's outer HTTP headers are not covered by its signed policy document and do not correspond to any tag S3Controller actually applies to the object, so trusting one would let a caller satisfy a tag-scoped grant condition without the object ever carrying that tag. Closes #4243 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
This commit is contained in:
1 parent
5ace4281f3
commit
60b8fd2037
6 files changed
+502
-8
No files matched your search
+110
-1
@@ -404,5 +404,114 @@ class S3BucketPolicyEnforcementIntegrationTest {
|
||||
.statusCode(200)
|
||||
.body(equalTo(content));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void sameAccountPrimaryRequestNeedsOnlyOneAllowAcrossBothPolicies() {
|
||||
String suffix = UUID.randomUUID().toString().substring(0, 8);
|
||||
String bucket = "bp-either-" + suffix;
|
||||
|
||||
createBucket(bucket);
|
||||
|
||||
String developerName = "dev-" + suffix;
|
||||
Credentials developer = createUserWithCredentials(developerName);
|
||||
String writerName = "writer-" + suffix;
|
||||
Credentials writer = createUserWithCredentials(writerName);
|
||||
putUserPolicy(writerName, "WriteBucket", """
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:PutObject",
|
||||
"Resource": "arn:aws:s3:::%s/*"
|
||||
}
|
||||
]
|
||||
}""".formatted(bucket), "000000000000");
|
||||
|
||||
putBucketPolicy(bucket, """
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Principal": {"AWS": "%s"},
|
||||
"Action": ["s3:GetObject", "s3:PutObject"],
|
||||
"Resource": "arn:aws:s3:::%s/*"
|
||||
}
|
||||
]
|
||||
}""".formatted(developer.userArn(), bucket));
|
||||
|
||||
// 1. Bucket policy alone grants the developer, who has no identity policy at all
|
||||
given()
|
||||
.filter(developer.signer())
|
||||
.contentType("text/plain")
|
||||
.body("bucket policy only")
|
||||
.when()
|
||||
.put("/" + bucket + "/from-bucket-policy.txt")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
|
||||
// 2. Identity policy alone grants the writer, whom the bucket policy never names
|
||||
given()
|
||||
.filter(writer.signer())
|
||||
.contentType("text/plain")
|
||||
.body("identity policy only")
|
||||
.when()
|
||||
.put("/" + bucket + "/from-identity-policy.txt")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
|
||||
// 3. An explicit deny in the bucket policy overrides the writer's identity allow
|
||||
putBucketPolicy(bucket, """
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Principal": {"AWS": "%s"},
|
||||
"Action": ["s3:GetObject", "s3:PutObject"],
|
||||
"Resource": "arn:aws:s3:::%s/*"
|
||||
},
|
||||
{
|
||||
"Effect": "Deny",
|
||||
"Principal": {"AWS": "%s"},
|
||||
"Action": "s3:PutObject",
|
||||
"Resource": "arn:aws:s3:::%s/*"
|
||||
}
|
||||
]
|
||||
}""".formatted(developer.userArn(), bucket, writer.userArn(), bucket));
|
||||
|
||||
given()
|
||||
.filter(writer.signer())
|
||||
.contentType("text/plain")
|
||||
.body("denied by bucket policy")
|
||||
.when()
|
||||
.put("/" + bucket + "/denied-by-bucket-policy.txt")
|
||||
.then()
|
||||
.statusCode(403)
|
||||
.body(containsString("<Code>AccessDenied</Code>"));
|
||||
|
||||
// 4. An explicit deny in the identity policy overrides the developer's bucket-policy allow
|
||||
putUserPolicy(developerName, "DenyWrite", """
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Deny",
|
||||
"Action": "s3:PutObject",
|
||||
"Resource": "arn:aws:s3:::%s/*"
|
||||
}
|
||||
]
|
||||
}""".formatted(bucket), "000000000000");
|
||||
|
||||
given()
|
||||
.filter(developer.signer())
|
||||
.contentType("text/plain")
|
||||
.body("denied by identity policy")
|
||||
.when()
|
||||
.put("/" + bucket + "/denied-by-identity-policy.txt")
|
||||
.then()
|
||||
.statusCode(403)
|
||||
.body(containsString("<Code>AccessDenied</Code>"));
|
||||
}
|
||||
}
|
||||
+153
@@ -19,6 +19,7 @@ import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
|
||||
/**
|
||||
@@ -399,6 +400,158 @@ class S3PresignedPostAuthEnforcementIntegrationTest {
|
||||
.header("ETag", notNullValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(32)
|
||||
void acceptsGenuineSignatureWhenOnlyBucketPolicyAllowsPutObject() {
|
||||
String bucket = "presigned-post-bucket-policy-bucket";
|
||||
String key = "uploads/bucket-policy-only.txt";
|
||||
String fileContent = "uploaded under a bucket-policy-only grant";
|
||||
String userName = "presigned-post-bucket-policy-user";
|
||||
String[] credentials = createUserAndAccessKey(userName);
|
||||
String accessKeyId = credentials[0];
|
||||
String secretKey = credentials[1];
|
||||
|
||||
createBucket(bucket);
|
||||
putBucketPolicy(bucket, """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow",
|
||||
"Principal":{"AWS":"arn:aws:iam::000000000000:user/%1$s"},
|
||||
"Action":"s3:PutObject",
|
||||
"Resource":"arn:aws:s3:::%2$s/*"}
|
||||
]}""".formatted(userName, bucket));
|
||||
|
||||
String policyBase64 = buildPolicyBase64(bucket, key);
|
||||
String credential = accessKeyId + "/20260101/us-east-1/s3/aws4_request";
|
||||
String signature = signPolicy(policyBase64, credential, secretKey);
|
||||
|
||||
given()
|
||||
.multiPart("key", key)
|
||||
.multiPart("policy", policyBase64)
|
||||
.multiPart("x-amz-algorithm", "AWS4-HMAC-SHA256")
|
||||
.multiPart("x-amz-credential", credential)
|
||||
.multiPart("x-amz-date", AMZ_DATE)
|
||||
.multiPart("x-amz-signature", signature)
|
||||
.multiPart("file", "bucket-policy-only.txt",
|
||||
fileContent.getBytes(StandardCharsets.UTF_8), "text/plain")
|
||||
.when()
|
||||
.post("/" + bucket)
|
||||
.then()
|
||||
.statusCode(204)
|
||||
.header("ETag", notNullValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(33)
|
||||
void rejectsGenuineSignatureWhenBucketPolicyDeniesPutObject() {
|
||||
String bucket = "presigned-post-bucket-policy-deny-bucket";
|
||||
String key = "uploads/bucket-policy-denied.txt";
|
||||
String userName = "presigned-post-bucket-policy-denied-user";
|
||||
String[] credentials = createUserAndAccessKey(userName);
|
||||
String accessKeyId = credentials[0];
|
||||
String secretKey = credentials[1];
|
||||
putUserPolicy(userName, "AllowPutObject", """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow","Action":"s3:PutObject","Resource":"*"}
|
||||
]}""");
|
||||
|
||||
createBucket(bucket);
|
||||
putBucketPolicy(bucket, """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Deny",
|
||||
"Principal":{"AWS":"arn:aws:iam::000000000000:user/%1$s"},
|
||||
"Action":"s3:PutObject",
|
||||
"Resource":"arn:aws:s3:::%2$s/*"}
|
||||
]}""".formatted(userName, bucket));
|
||||
|
||||
String policyBase64 = buildPolicyBase64(bucket, key);
|
||||
String credential = accessKeyId + "/20260101/us-east-1/s3/aws4_request";
|
||||
String signature = signPolicy(policyBase64, credential, secretKey);
|
||||
|
||||
given()
|
||||
.multiPart("key", key)
|
||||
.multiPart("policy", policyBase64)
|
||||
.multiPart("x-amz-algorithm", "AWS4-HMAC-SHA256")
|
||||
.multiPart("x-amz-credential", credential)
|
||||
.multiPart("x-amz-date", AMZ_DATE)
|
||||
.multiPart("x-amz-signature", signature)
|
||||
.multiPart("file", "bucket-policy-denied.txt",
|
||||
"should not be stored".getBytes(StandardCharsets.UTF_8), "text/plain")
|
||||
.when()
|
||||
.post("/" + bucket)
|
||||
.then()
|
||||
.statusCode(403)
|
||||
.body("Error.Code", equalTo("AccessDenied"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Regression for a tag-condition spoofing gap: a presigned POST's signed policy document
|
||||
* covers the multipart fields, never the request's outer HTTP headers, and {@code
|
||||
* S3Controller} does not apply any tag to the uploaded object on this path at all. A
|
||||
* bucket-policy grant conditioned on {@code s3:RequestObjectTag/*} must not be satisfiable by
|
||||
* setting an unsigned {@code x-amz-tagging} header, since a caller could then obtain a grant
|
||||
* meant only for tagged uploads without the object ever carrying that tag.
|
||||
*/
|
||||
@Test
|
||||
@Order(34)
|
||||
void rejectsGenuineSignatureWhenBucketPolicyGrantRequiresATagTheHeaderCannotSupply() {
|
||||
String bucket = "presigned-post-tag-condition-bucket";
|
||||
String key = "uploads/tag-condition.txt";
|
||||
String userName = "presigned-post-tag-condition-user";
|
||||
String[] credentials = createUserAndAccessKey(userName);
|
||||
String accessKeyId = credentials[0];
|
||||
String secretKey = credentials[1];
|
||||
|
||||
createBucket(bucket);
|
||||
putBucketPolicy(bucket, """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow",
|
||||
"Principal":{"AWS":"arn:aws:iam::000000000000:user/%1$s"},
|
||||
"Action":"s3:PutObject",
|
||||
"Resource":"arn:aws:s3:::%2$s/*",
|
||||
"Condition":{"StringEquals":{"s3:RequestObjectTag/team":"eng"}}}
|
||||
]}""".formatted(userName, bucket));
|
||||
|
||||
String policyBase64 = buildPolicyBase64(bucket, key);
|
||||
String credential = accessKeyId + "/20260101/us-east-1/s3/aws4_request";
|
||||
String signature = signPolicy(policyBase64, credential, secretKey);
|
||||
|
||||
given()
|
||||
.header("x-amz-tagging", "team=eng")
|
||||
.multiPart("key", key)
|
||||
.multiPart("policy", policyBase64)
|
||||
.multiPart("x-amz-algorithm", "AWS4-HMAC-SHA256")
|
||||
.multiPart("x-amz-credential", credential)
|
||||
.multiPart("x-amz-date", AMZ_DATE)
|
||||
.multiPart("x-amz-signature", signature)
|
||||
.multiPart("file", "tag-condition.txt",
|
||||
"should not be stored".getBytes(StandardCharsets.UTF_8), "text/plain")
|
||||
.when()
|
||||
.post("/" + bucket)
|
||||
.then()
|
||||
.statusCode(403)
|
||||
.body("Error.Code", equalTo("AccessDenied"));
|
||||
}
|
||||
|
||||
private static void createBucket(String bucket) {
|
||||
given()
|
||||
.filter(S3RequestSigner.signedAs(LEGACY_ACCESS_KEY_ID, LEGACY_SECRET_KEY))
|
||||
.when()
|
||||
.put("/" + bucket)
|
||||
.then()
|
||||
.statusCode(200);
|
||||
}
|
||||
|
||||
private static void putBucketPolicy(String bucket, String policyDocument) {
|
||||
given()
|
||||
.filter(S3RequestSigner.signedAs(LEGACY_ACCESS_KEY_ID, LEGACY_SECRET_KEY))
|
||||
.contentType("application/json")
|
||||
.body(policyDocument)
|
||||
.when()
|
||||
.put("/" + bucket + "?policy")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
}
|
||||
|
||||
private static final String IAM_ROOT_AUTH =
|
||||
"AWS4-HMAC-SHA256 Credential=" + LEGACY_ACCESS_KEY_ID + "/20260101/us-east-1/iam/aws4_request"
|
||||
+ ", SignedHeaders=host, Signature=abc";
|
||||
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
package io.github.hectorvent.floci.services.s3;
|
||||
|
||||
import io.github.hectorvent.floci.core.common.IamEnforcementFilter;
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.quarkus.test.junit.QuarkusTestProfile;
|
||||
import io.quarkus.test.junit.TestProfile;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
/**
|
||||
* Regression coverage for a presigned POST bucket-policy-only grant where the bucket and the
|
||||
* signer both live in a non-default account, distinct from
|
||||
* {@code S3PresignedPostIamOnlyEnforcementIntegrationTest}'s identity-policy coverage of the
|
||||
* same account-context gap. {@link IamEnforcementFilter#authorizeAdditionalResource(String,
|
||||
* String, String)} must resolve the applicable bucket policy under the signing credential's own
|
||||
* account context (pushed onto {@code RequestContext} for the duration of that call), or a bucket
|
||||
* owned by a non-default account is invisible to it and the grant is silently dropped.
|
||||
*
|
||||
* <p>{@code global-bucket-namespace} is enabled so bucket resolution (both here and in the
|
||||
* eventual object write) does not itself depend on the ambient account, isolating the assertion
|
||||
* to the account used for the identity/resource-policy relationship rather than to bucket lookup
|
||||
* scoping.
|
||||
*/
|
||||
@QuarkusTest
|
||||
@TestProfile(S3PresignedPostBucketPolicyAccountContextIntegrationTest.GlobalNamespaceIamOnlyProfile.class)
|
||||
class S3PresignedPostBucketPolicyAccountContextIntegrationTest {
|
||||
|
||||
private static final String REGION = "us-east-1";
|
||||
/** A non-default account, distinct from the configured {@code 000000000000} default. */
|
||||
private static final String NON_DEFAULT_ACCOUNT = "222233334444";
|
||||
private static final DateTimeFormatter AMZ_DATE_FMT =
|
||||
DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss'Z'").withZone(ZoneOffset.UTC);
|
||||
|
||||
public static final class GlobalNamespaceIamOnlyProfile implements QuarkusTestProfile {
|
||||
@Override
|
||||
public Map<String, String> getConfigOverrides() {
|
||||
return Map.of(
|
||||
"floci.services.iam.enforcement-enabled", "true",
|
||||
"floci.services.s3.enforce-auth", "false",
|
||||
"floci.services.s3.global-bucket-namespace", "true");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void presignedPostSucceedsForNonDefaultAccountBucketAndSignerWhenOnlyBucketPolicyAllows() {
|
||||
String suffix = UUID.randomUUID().toString().substring(0, 8);
|
||||
String bucket = "presigned-post-bp-xacct-" + suffix;
|
||||
String userName = "presigned-post-bp-xacct-user-" + suffix;
|
||||
|
||||
createBucketAsRoot(bucket, NON_DEFAULT_ACCOUNT);
|
||||
String accessKeyId = createUser(userName, NON_DEFAULT_ACCOUNT);
|
||||
putBucketPolicy(bucket, """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow",
|
||||
"Principal":{"AWS":"arn:aws:iam::%1$s:user/%2$s"},
|
||||
"Action":"s3:PutObject",
|
||||
"Resource":"arn:aws:s3:::%3$s/*"}
|
||||
]}""".formatted(NON_DEFAULT_ACCOUNT, userName, bucket), NON_DEFAULT_ACCOUNT);
|
||||
|
||||
given()
|
||||
.multiPart("key", "bp-allowed-xacct.txt")
|
||||
.multiPart("x-amz-credential", presignedCredential(accessKeyId))
|
||||
.multiPart("file", "bp-allowed-xacct.txt",
|
||||
"uploaded via presigned POST".getBytes(StandardCharsets.UTF_8), "text/plain")
|
||||
.when()
|
||||
.post("/" + bucket)
|
||||
.then()
|
||||
.statusCode(204);
|
||||
}
|
||||
|
||||
private static String presignedCredential(String accessKeyId) {
|
||||
String amzDate = AMZ_DATE_FMT.format(Instant.now());
|
||||
String dateStamp = amzDate.substring(0, 8);
|
||||
return accessKeyId + "/" + dateStamp + "/" + REGION + "/s3/aws4_request";
|
||||
}
|
||||
|
||||
private static void createBucketAsRoot(String bucket, String accountId) {
|
||||
given()
|
||||
.header("Authorization", auth(accountId, "s3"))
|
||||
.when()
|
||||
.put("/" + bucket)
|
||||
.then()
|
||||
.statusCode(200);
|
||||
}
|
||||
|
||||
private static void putBucketPolicy(String bucket, String policyDocument, String accountId) {
|
||||
given()
|
||||
.header("Authorization", auth(accountId, "s3"))
|
||||
.contentType("application/json")
|
||||
.body(policyDocument)
|
||||
.when()
|
||||
.put("/" + bucket + "?policy")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
}
|
||||
|
||||
/** Creates the user (and its access key) as root in {@code accountId}. */
|
||||
private static String createUser(String userName, String accountId) {
|
||||
String authHeader = auth(accountId, "iam");
|
||||
given()
|
||||
.formParam("Action", "CreateUser")
|
||||
.formParam("UserName", userName)
|
||||
.header("Authorization", authHeader)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
|
||||
return given()
|
||||
.formParam("Action", "CreateAccessKey")
|
||||
.formParam("UserName", userName)
|
||||
.header("Authorization", authHeader)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.extract()
|
||||
.path("CreateAccessKeyResponse.CreateAccessKeyResult.AccessKey.AccessKeyId");
|
||||
}
|
||||
|
||||
private static String auth(String accessKeyId, String service) {
|
||||
String amzDate = AMZ_DATE_FMT.format(Instant.now()).substring(0, 8);
|
||||
return "AWS4-HMAC-SHA256 Credential=" + accessKeyId + "/" + amzDate + "/" + REGION + "/" + service
|
||||
+ "/aws4_request, SignedHeaders=host, Signature=abc";
|
||||
}
|
||||
}
|
||||
+55
@@ -142,6 +142,61 @@ class S3PresignedPostIamOnlyEnforcementIntegrationTest {
|
||||
.statusCode(204);
|
||||
}
|
||||
|
||||
/**
|
||||
* Regression for {@code IamEnforcementFilter#authorizeAdditionalResource} resolving the
|
||||
* bucket policy without the global condition keys ({@code aws:PrincipalAccount} in
|
||||
* particular) that {@code filter()} always supplies for the header-signed and presigned-URL
|
||||
* paths. A bucket-policy {@code Deny} conditioned on the account key being absent must not
|
||||
* fire for a genuine signed principal, whose account this filter always knows. Exercised in
|
||||
* this IAM-only profile (rather than {@code S3PresignedPostAuthEnforcementIntegrationTest})
|
||||
* so only {@code authorizeAdditionalResource} gates the request: with
|
||||
* {@code s3.enforce-auth} on, {@code S3Service#authorizeSignedBucketPolicy} independently
|
||||
* re-evaluates the same bucket policy through its own, narrower condition context.
|
||||
*/
|
||||
@Test
|
||||
void presignedPostSucceedsWhenBucketPolicyDeniesOnlyForMissingPrincipalAccount() {
|
||||
String suffix = UUID.randomUUID().toString().substring(0, 8);
|
||||
String bucket = "presigned-post-null-condition-" + suffix;
|
||||
String userName = "presigned-post-null-condition-user-" + suffix;
|
||||
|
||||
createBucketAsRoot(bucket);
|
||||
String accessKeyId = createUser(userName);
|
||||
putUserPolicy(userName, "AllowPutObject", """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow","Action":"s3:PutObject","Resource":"*"}
|
||||
]}""");
|
||||
putBucketPolicy(bucket, """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Deny",
|
||||
"Principal":{"AWS":"arn:aws:iam::000000000000:user/%1$s"},
|
||||
"Action":"s3:PutObject",
|
||||
"Resource":"arn:aws:s3:::%2$s/*",
|
||||
"Condition":{"Null":{"aws:PrincipalAccount":"true"}}}
|
||||
]}""".formatted(userName, bucket));
|
||||
|
||||
given()
|
||||
.multiPart("key", "principal-account-present.txt")
|
||||
.multiPart("x-amz-credential", presignedCredential(accessKeyId))
|
||||
.multiPart("file", "principal-account-present.txt",
|
||||
"uploaded with aws:PrincipalAccount populated".getBytes(StandardCharsets.UTF_8),
|
||||
"text/plain")
|
||||
.when()
|
||||
.post("/" + bucket)
|
||||
.then()
|
||||
.statusCode(204);
|
||||
}
|
||||
|
||||
private static void putBucketPolicy(String bucket, String policyDocument) {
|
||||
given()
|
||||
.header("Authorization", auth("test", "s3"))
|
||||
.contentType("application/json")
|
||||
.body(policyDocument)
|
||||
.when()
|
||||
.put("/" + bucket + "?policy")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
}
|
||||
|
||||
private static String presignedCredential(String accessKeyId) {
|
||||
String amzDate = AMZ_DATE_FMT.format(Instant.now());
|
||||
String dateStamp = amzDate.substring(0, 8);
|
||||
|
||||
Reference in new issue
Block a user