Bug 2056519 - unable to install IPI PRIVATE OpenShift cluster in Azure due to organization policies
Summary: unable to install IPI PRIVATE OpenShift cluster in Azure due to organization ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: Oleg Bulatov
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-21 12:48 UTC by pawankum
Modified: 2023-01-26 08:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 10:50:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-image-registry-operator pull 756 0 None open Bug 2056519: Enable enableHttpsTrafficOnly for Azure storage account 2022-02-21 17:35:24 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:51:03 UTC

Description pawankum 2022-02-21 12:48:39 UTC
Version: 4.9

Platform:
azure

Please specify:
* IPI

What happened?
Issue: Customer reports unable to install IPI PRIVATE OpenShift cluster in Azure. They have orgnization policy which do not allow them to create storage account with public access. It should be disallowed. 

What did you expect to happen?
Installer completes successfully.

Comment 1 Matthew Staebler 2022-02-21 15:53:04 UTC
Please provide more details about the errors that the customer is seeing.

Comment 2 pawankum 2022-02-21 16:01:34 UTC
(In reply to Matthew Staebler from comment #1)
> Please provide more details about the errors that the customer is seeing.

ERROR MESSAGE=
Message:               Progressing: Unable to apply resources: unable to sync storage configuration: failed to start creating storage account: storage.AccountsClient#Create: Failure sending request: StatusCode=0 -- Original Error: Code="RequestDisallowedByPolicy" Message="Resource 'imageregistryazcnor5mfd5' was disallowed by policy. Policy identifiers: '[{\"policyAssignment\":{\"name\":\"Deny blob unsecure transfer\",\"id\":\"/providers/Microsoft.Management/managementGroups/Swedbank/providers/Microsoft.Authorization/policyAssignments/prd-deny-blob-unsec-tran\"},\"policyDefinition\":{\"name\":\"Deny blob unsecure transfer\",\"id\":\"/providers/Microsoft.Management/managementGroups/Swedbank/providers/Microsoft.Authorization/policyDefinitions/az-cfcore-prd-deny-blob-unsecure-transfer\"}}]'." Target="imageregistryazcnor5mfd5" AdditionalInfo=[{"info":{"evaluationDetails":{"evaluatedExpressions":[{"expression":"type","expressionKind":"Field","expressionValue":"Microsoft.Storage/storageAccounts","operator":"Equals","path":"type","result":"True","targetValue":"Microsoft.Storage/storageAccounts"},{"expression":"Microsoft.Storage/storageAccounts/supportsHttpsTrafficOnly","expressionKind":"Field","operator":"Exists","path":"properties.supportsHttpsTrafficOnly","result":"True","targetValue":"false"}]},"policyAssignmentDisplayName":"Deny blob unsecure transfer","policyAssignmentId":"/providers/Microsoft.Management/managementGroups/Swedbank/providers/Microsoft.Authorization/policyAssignments/prd-deny-blob-unsec-tran","policyAssignmentName":"prd-deny-blob-unsec-tran","policyAssignmentScope":"/providers/Microsoft.Management/managementGroups/Swedbank","policyDefinitionDisplayName":"Deny blob unsecure transfer","policyDefinitionEffect":"Deny","policyDefinitionId":"/providers/Microsoft.Management/managementGroups/Swedbank/providers/Microsoft.Authorization/policyDefinitions/az-cfcore-prd-deny-blob-unsecure-transfer","policyDefinitionName":"az-cfcore-prd-deny-blob-unsecure-transfer"},"type":"PolicyViolation"}]

Comment 3 Matthew Staebler 2022-02-21 16:39:50 UTC
That error is from the image registry. I am re-assigning the BZ there.

Comment 4 Oleg Bulatov 2022-02-21 17:34:54 UTC
The policy forbids `supportsHttpsTrafficOnly` to be false.

Comment 6 pawankum 2022-02-22 09:52:08 UTC
Hello,

I can see the target release is 4.11, is there any possibility of backport in 4.9 version?

Comment 8 Oleg Bulatov 2022-02-22 10:05:58 UTC
The policy expects supportsHttpsTrafficOnly to be present, but as it is `true` by default, this policy is questionable. The image registry operator doesn't send this property explicitly and relies on the default value. If that's the only policy, it'll allow requests that explicitly set supportsHttpsTrafficOnly to `false`.

Given that setting supportsHttpsTrafficOnly explicitly to `true` won't change behavior, I doubt we need to change anything in OpenShift and would recommend to correct the policy.

Comment 9 pawankum 2022-02-22 14:23:57 UTC
(In reply to Oleg Bulatov from comment #8)
> The policy expects supportsHttpsTrafficOnly to be present, but as it is
> `true` by default, this policy is questionable. The image registry operator
> doesn't send this property explicitly and relies on the default value. If
> that's the only policy, it'll allow requests that explicitly set
> supportsHttpsTrafficOnly to `false`.
> 
> Given that setting supportsHttpsTrafficOnly explicitly to `true` won't
> change behavior, I doubt we need to change anything in OpenShift and would
> recommend to correct the policy.

Let me check with the customer and will get back to you soon.

Comment 22 errata-xmlrpc 2022-08-10 10:50:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069

Comment 26 Santhiya R 2022-10-07 07:04:43 UTC

Hello @obulatov, IHAC is facing an issue with cluster installation ocp 4.8 on azure using IPI due to the organization policy which "Deny Public Network Access" prevents Storage account creation

I can see the target release is 4.11, is there any possibility of backporting in the 4.8 version?

Comment 28 Oleg Bulatov 2022-10-12 13:25:56 UTC
Santhiya, this BZ is not about Deny Public Network Access, it is about explicitly setting enableHttpsTrafficOnly to true (which is its default value, so the fix doesn't change any storage parameters).

Comment 29 pawankum 2022-11-29 00:53:52 UTC
Hello,

Is there any possibilities of backport to 4.10? 



Regards,
Pawan


Note You need to log in before you can comment on or make changes to this bug.