Using Tokens from an Azure Container Registry as pull-secrets in Redhat Openshift

I don’t seem to be able to generate a usable secret with Tokens in ACR. The method outlined here:
https://learn.microsoft.com/en-us/azure/openshift/howto-use-acr-with-aro
only mentions the Access keys which doesn’t allow me to scope permissions to just pull like the tokens allow.

when using this method to generate a secret with the token anyways I get unable to retrieve auth token: invalid username/password: unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information with an ImagePullBackoff.

looking at the microsoft article for access control for ACR, I see it mentions an authorized Identity.
Do I need to set up some sort of service principal in order for tokens to work?
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-roles?tabs=azure-cli

Pull image

The ability to docker pull a non-quarantined image, or pull another supported artifact such as a Helm chart, from a registry. Requires authentication with the registry using the authorized identity.

Does anyone know of any resources that outline this process?

tried with:

simplified
echo '{"auths":{"registryname.azurecr.io":{"auth":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX="}}}'' | base64

copied to

apiVersion: v1
data:
  .dockerconfigjson: xxxxxxxxxxxxxxxxxx
kind: Secret
metadata:
  name: scoped-acr-secret
type: kubernetes.io/dockerconfigjson

I thought maybe it needed more details so I tried:

oc create secret docker-registry 
    --docker-server=registryname.azurecr.io 
    --docker-username=<registryname> 
    --docker-password=******** 
    --docker-email=unused 
    scoped-acr-secret

to no avail.

To use ACR tokens as pull secrets in OpenShift, the process is slightly different compared to using access keys or service principals.

You need to create a scope map that defines the permissions let’s say pull only

az acr scope-map create --registry <ACR NAME> --name <SCOPE NAME> --repository <REPO NAME> content/read

Now, create a token that uses the scope map created above

az acr token create --name <TOKEN NAME> --registry <ACR NAME> --scope-map <SCOPE NAME>

Retrieve the username and password associated with the token

az acr token credential generate --name <TOKEN_NAME> --registry <ACR_NAME>

Done. Successfully created the token and generated credentials. Now use this token as a pull secret in OpenShift, you’ll need to use the username (which is pull-only-token) and one of the password values (let’s use password1) to create the pull secret. You can follow the rest from the document you shared

oc create secret docker-registry scoped-acr-secret 
    --docker-server=arkoregistry.azurecr.io 
    --docker-username=pull-only-token 
    --docker-password="fUdzMu9x2GDK/DhZAIKNsazZmi5x9uO7JLrIktADJB+ACRBiaXnW" 
    [email protected]

Link the Secret to the Default Service Account

oc secrets link default scoped-acr-secret --for=pull

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật