이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 2. Authenticating Red Hat Edge Manager on Red Hat OpenShift Container Platform
Users can enable secure access to Red Hat Edge Manager by integrating their existing OpenShift identity provider. This guide walks you through labeling your environment and assigning the specific roles required for your team to manage devices, fleets, and organizations.
- Namespace-to-Organization Mapping: Red Hat Edge Manager uses a 1:1 mapping between OpenShift namespaces and Organizations.
-
Automatic Discovery: The act of labeling a namespace with
io.flightctl/instance=<helm_release-name>triggers the automatic discovery and initialization of that namespace as a Red Hat Edge Manager Organization. - Multi-Tenancy: You are not limited to a single organization. You can create and manage multiple isolated organizations within a single cluster by applying the same management label to different namespaces.
- Identity: Each labeled namespace is treated as a distinct organization, allowing you to segregate users, devices, and configurations across your environment.
Prerequisites
- Red Hat Edge Manager is deployed on Red Hat OpenShift Container Platform via the Software Catalog.
-
Red Hat OpenShift Container Platform users are created via an identity provider (e.g.
htpasswdor LDAP). -
You have
cluster-adminaccess to configureRoleBindings.
Procedure
-
In the Red Hat OpenShift Container Platform web console, navigate to Helm
Releases and record the Helm release name. This value is required for labeling the namespace and configuring user access. In your terminal, run the following command to label the namespace:
oc label namespace <namespace> io.flightctl/instance=<helm_release_name>
$ oc label namespace <namespace> io.flightctl/instance=<helm_release_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantThe label value must match the Helm release name, not the namespace name.
To verify which namespaces are associated with the Helm release name, run the following command:
oc get namespaces -l io.flightctl/instance=<helm_release_name>
$ oc get namespaces -l io.flightctl/instance=<helm_release_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.1. Grant user access 링크 복사링크가 클립보드에 복사되었습니다!
Accessing Red Hat Edge Manager resources requires a minimum of two roles: the mandatory view role for organization discovery, plus at least one functional role (e.g., flightctl-admin).
| Role | Purpose |
|---|---|
|
| Required for organization discovery. |
|
| Full access to Red Hat Edge Manager resources. |
|
| CRUD permissions for devices, fleets, resourcesyncs, and repositories. |
|
| Read-only access. |
Procedure
To grant the
viewrole for organization discovery:oc adm policy add-role-to-user view <user_name> -n <namespace>
$ oc adm policy add-role-to-user view <user_name> -n <namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To grant Red Hat Edge Manager administrative permissions:
oc adm policy add-role-to-user flightctl-admin-<helm_release_name> <user_name> -n <namespace>
$ oc adm policy add-role-to-user flightctl-admin-<helm_release_name> <user_name> -n <namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To grant permissions for CRUD operations on Red Hat Edge Manager resources:
oc adm policy add-role-to-user flightctl-operator-<helm_release_name> <user_name> -n <namespace>
$ oc adm policy add-role-to-user flightctl-operator-<helm_release_name> <user_name> -n <namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To grant Red Hat Edge Manager read-only access:
oc adm policy add-role-to-user flightctl-viewer-<helm_release_name> <user_name> -n <namespace>
$ oc adm policy add-role-to-user flightctl-viewer-<helm_release_name> <user_name> -n <namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
A User not found warning is expected if the user has not yet logged in. The role binding will activate automatically upon their first authentication.
2.2. User login 링크 복사링크가 클립보드에 복사되었습니다!
You can authenticate with Red Hat Edge Manager using either the flightctl CLI or the UI.
2.2.1. Log in with the CLI 링크 복사링크가 클립보드에 복사되었습니다!
Procedure
Log in to OpenShift:
oc login
$ oc loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow Log in to Red Hat Edge Manager using the OpenShift token:
flightctl login https://api.flightctl.apps.example.com -k --token=$(oc whoami -t)
$ flightctl login https://api.flightctl.apps.example.com -k --token=$(oc whoami -t)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Auto-selected organization: <uuid> flightctl Login successful.
Auto-selected organization: <uuid> flightctl Login successful.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.2. Log in with the UI 링크 복사링크가 클립보드에 복사되었습니다!
Procedure
- Navigate to the Red Hat Edge Manager UI.
- Click Login with OpenShift.
- Authenticate using your OpenShift credentials.
Upon successful authentication, the browser redirects to the Red Hat Edge Manager dashboard.
2.3. Verification 링크 복사링크가 클립보드에 복사되었습니다!
Verify your access and configuration by running the following commands:
Procedure
Check the current organization:
flightctl config current-organization
$ flightctl config current-organizationCopy to Clipboard Copied! Toggle word wrap Toggle overflow List available organizations:
flightctl get organizations
$ flightctl get organizationsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Test access to resources:
flightctl get devices flightctl get fleets
$ flightctl get devices $ flightctl get fleetsCopy to Clipboard Copied! Toggle word wrap Toggle overflow