반응형

Service Account에 역할(Role)을 Binding하는 기능에 대한 설명을 보고 싶다면, 아래 Web Docs의 10.3 절을 참고할 것 !!!

 

 

https://access.redhat.com/documentation/ko-kr/openshift_container_platform/4.10/html-single/authentication_and_authorization/index

 

인증 및 권한 부여 OpenShift Container Platform 4.10 | Red Hat Customer Portal

이 문서에서는 OpenShift Container Platform에서 ID 공급자를 정의하는 방법을 설명합니다. 또한 클러스터를 보호하기 위해 역할 기반 액세스 제어를 구성하는 방법도 알아봅니다.

access.redhat.com

 

 

`oc login` 명령을 이용하여 Service Account에 로그인하는 방법은 위 Web Docs의 11.4 절을 참고할 것 !!!

Cluster 외부에서 Service Account로 Login하는 방법을 요약하자면,
1) Service Account의 Secret 정보(즉, Token)을 열람
2) 이 Secret(즉, Token)을 `oc login --token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...` 이렇게 입력
3) `oc login` 성공하면,
4) `oc whoami`를 수행

 

'kubernetes' 카테고리의 다른 글

NUMA, CPU Pinning, DPDK, SR-IOV  (0) 2022.06.18
Service Account에 Role 부여 (Binding)  (0) 2022.06.16
Openshift Authentication and authorization  (0) 2022.06.06
OCP API Token 조회  (0) 2022.05.19
kubernetes node의 taint & toleration  (0) 2022.03.30
반응형

Openshift 4.10 인증, 권한에 관해 자세히 알고 싶다면, 아래 Red Hat 공식 Web Docs를 읽어 보자!

 

(한국어 문서)

https://access.redhat.com/documentation/ko-kr/openshift_container_platform/4.10/html-single/authentication_and_authorization/index

 

인증 및 권한 부여 OpenShift Container Platform 4.10 | Red Hat Customer Portal

이 문서에서는 OpenShift Container Platform에서 ID 공급자를 정의하는 방법을 설명합니다. 또한 클러스터를 보호하기 위해 역할 기반 액세스 제어를 구성하는 방법도 알아봅니다.

access.redhat.com

 

 

(영어 문서)

https://access.redhat.com/documentation/en-us/openshift_container_platform/4.10/html-single/authentication_and_authorization/index

 

Authentication and authorization OpenShift Container Platform 4.10 | Red Hat Customer Portal

This document provides instructions for defining identity providers in OpenShift Container Platform. It also discusses how to configure role-based access control to secure the cluster.

access.redhat.com

 

반응형

 

(1)  OCP의 Web Console에서 오른쪽 위에 있는 "계정 이름"을 클릭한다.

 

(2)  [ Copy login command ]을 클릭하면, 새 브라우저 창이 뜬다.

 

 

 

(3)  위 화면에서 [ Copy login command ]을 클릭하면 아래와 같은 브라우저 창이 새로 열릴 것이다.
       이 때 [ Display Token ]을 클릭한다.

 

 

 

(4)  아래와 같이 OCP API Token과,  oc login 명령 예시가 보일 것이다.

 

 

 

(5)  아래와 같이 curl로 TOKEN 값을 이용해서 API를 호출할 수 있다.

 

$  curl -X GET -H "Authorization: Bearer sha256~v9-kYQ_N...중간 생략...z1X5UA" https://api.myasset.cloud:6443/api/v1/namespaces/openshift-etcd/pods --insecure
반응형

 

Ubuntu, CentOS  등  Linux OS를 기본 설정으로 설치하면, Root 계정의 SSH login이 금지(Prohibit)된다.

따라서 아래 /etc/ssh/sshd_config 설정 파일의 예제처럼 변경하고 sshd(ssh 서버 데몬)을 restart해줘야 한다.

 

$ cd /root/ssh
$ cat sshd_config

... 중간 생략 ...

PermitRootLogin yes   ## <- 이 설정 부분을 'yes'로 변경한다.

... 중간 생략 ...

$ systemctl restart sshd

$ systemctl status sshd
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-12-28 10:16:34 KST; 1min 33s ago

... 중간 생략 ...
      
$

 

'Ubuntu' 카테고리의 다른 글

rc.local 활성 설정 (Ubuntu, CentOS)  (0) 2021.12.28
추가 장착한 Disk Mount  (0) 2021.12.28
Install BIND for name server(DNS) on Ubuntu 22.04  (0) 2021.11.05
openssl command example  (0) 2021.11.04
.bashrc 또는 .bash_profile 설정  (0) 2021.07.22

+ Recent posts