Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 6. 권한관리 1. OVERVIEW Authorization Check 의 정의 SAP 에서 권한의 부여는 기본적으로 Transaction 단위로 이루어진다. 만약 권한을 부여 받지 못한 사용자가 Transaction 을 접근하는 경우 접근 거부를 나타내는.

Similar presentations


Presentation on theme: "1 Chapter 6. 권한관리 1. OVERVIEW Authorization Check 의 정의 SAP 에서 권한의 부여는 기본적으로 Transaction 단위로 이루어진다. 만약 권한을 부여 받지 못한 사용자가 Transaction 을 접근하는 경우 접근 거부를 나타내는."— Presentation transcript:

1

2 1 Chapter 6. 권한관리 1. OVERVIEW Authorization Check 의 정의 SAP 에서 권한의 부여는 기본적으로 Transaction 단위로 이루어진다. 만약 권한을 부여 받지 못한 사용자가 Transaction 을 접근하는 경우 접근 거부를 나타내는 메시지를 보낸다. 권한에 대한 점검은 Transaction 이 실행되는 동안 여러 부분에서 실행 하게 된다. SAP 시스템에서 제공되는 권한체크는 많은 종류가 있지만 크게 3 가지로 구분된다. Authorization Check for Transactions 트랜잭션에 직접 권한 설정을 할 수 있다. [ 그림 1-3] 에서와 같이 트랜잭션 오브젝트 내에 직접 권한오브젝트를 연결할 수 있다. Authorization Check for ABAP Programs ABAP 프로그램 내에서는 S_DEVELOP 과 S_PROGRAM 두 가지 권한 오브젝트가 존재한다. [ 그림 1-4] 에서처럼 개별 프로그램에 권한 오브젝트를 연결할 수 있다. Authorization Check in ABAP Programs 이번 챕터에서는 실제 업무에서 많이 사용하고 있는 이 부분에 대해서 다루고자 한다. 위 두 가지 경우보다 좀더 세련되고 상세한 권한관리를 제공한다. 예를 들면 CARRID 가 ‘AA’ 인 데이터에 대해서만 접근할 수 있는 권한을 부여할 수 있다. [ 그림 1-4] 에서 프로그램내의 ABAP Code AUTHORITY-CHECK 에 의해 사용자 권한이 점검 된다. ▲그림 1-1. 권한체크 프로세스 1. OVERVIEW AUTHORITY-CHECK OBJECT 'Z_TEST' ID 'CARRID' FIELD ‘AA’ ID 'ACTVT' FIELD '03'. ▲그림 1-2. 권한체크

3 2 ▲그림 1-5. 권한체크 로직 [ 그림 1-3] 에서 Company Code 100 에 접근할 수 있다라는 것을 Authorization 이라 한다. 또한 Company Code 200 에 대해 접근할 수 있다라는 것도 다른 Authorization 이 될 수 있다. 옆의 두 Authorization 은 동일한 Company Code 에 대해 다른 Value 만을 가지고 있음을 알 수 있다 즉 그림의 두 권한은 동일한 Authorization Object 을 가지고 있다는 것을 알 수 있다. Authorization Object 는 Authorization 을 구성하기 위한 Field 을 가지고 있고 이 Field 에 특정 Value 가 할당 되는 경우 Authorization 을 이루게 된다. SAP 에서 권한을 점검하는 최소의 단위는 Authorization Object 이다. Authorization Object 을 동일한 범주로 묶는 것을 Object Class 라 한다. 100 200 Chapter 6. 권한관리 1. OVERVIEW ▲그림 1-3. for Transactions ▲ 그림 1-4. for ABAP Programs ▲그림 1-6. 권한체크 User action

4 3 ▲그림 1-7. 권한체크 로직 Profile Generator 는 권한 생성을 단순화 시키기 위해 개발된 것으로 SAP 메뉴를 기준으로 필요한 기능을 선택하여 Role 을 생성한다. 이 Role 은 사용자에게 부여 할 수 있는 역할을 나타내고 이를 사용자에게 할당할 수 있다. [ 그림 1-7] 에서 권한 오브젝트, ROLE, 사용자의 관계를 보여주고 있다. ROLE 을 기준으로 하여 권한오브젝트와 사용자가 다중 관계를 이루고 있다. 하나의 롤에는 여러 개의 권한 오브젝트가 추가될 수 있고, 이렇게 생성된 롤은 다수의 사용자들에게 할당 될 수 있다는 의미이다. 뒷장에서부터 살펴보게 될 권한 오브젝트와 ROLE 에 대해서 학습하면 무슨 의미인지 쉽게 알 수 있을 것이다. ROLE 1 ROLE 2 ROLE N Chapter 6. 권한관리 1. OVERVIEW

5 4 2. 권한오브젝트 생성 권한 오브젝트를 생성하여, 프로그램 소스에 반영되는 절차를 설명하고자 한다. SFLIGHT 테이블의 CARRID 필드에 권한을 추가하는 작업을 따라 해 보면서 실습해보자. 1 1. SU20 트랜잭션을 이용하여 권한을 추가하고자 하는 필드를 생성한다. 필드네임과 DATA element 를 입력하고 엔터를 입력하고 테이블명을 입력한다. 이외의 필드는 자동으로 입력된다. 저장 버튼을 누르고 이전 화면의 LIST OF Authorization Field 화면에 CARRID 가 생성되었음을 확인한다. 당연히 CBO(Component Boln On) 테이블의 필드도 동일한 과정으로 생성할 수 있다. ▲그림 2-1. 권한 필드 생성 Chapter 6. 권한관리 2. 권한 오브젝트 생성 Chapter 6. 권한관리

6 5 ▲그림 2-2. 권한 클래스 생성 2. SU21 트랜잭션에 에서 생성 버튼을 클릭 후 클래스이름을 입력 후 저장 한다. 클래스 오브젝트는 권한 오브젝트들을 포함하는 상위 개념이다. ▲그림 2-3. 권한 오브젝트 생성 3. 저장한 후 이전화면에 돌아가면 권한 클래스 오브젝트가 생성되었음을 확인 할 수 있다. 클래스를 더블 클릭하여 권한 오브젝트를 생성하자. Chapter 6. 권한관리 2. 권한 오브젝트 생성 Chapter 6. 권한관리

7 6 ▲그림 2-4. 권한 오브젝트의 기능 4. 생성 변경 조회와 같은 권한을 부여 할 수 있다. ▲그림 2-5. ROLE 생성 5. Profile Generator(PFCG) 는 권한 생성을 단순화 시키기 위해 개발된 것으로 SAP 메뉴를 기준으로 필요한 기능을 선택하여 Role 을 생성한다. 이 Role 은 사용자에게 부여 할 수 있는 역할을 나타내고 이를 사용자에게 할당할 수 있다. Chapter 6. 권한관리 2. 권한 오브젝트 생성 Chapter 6. 권한관리

8 7 ROLE 좀더 살펴보기 PFCF 트랜잭션을 통하여 생성되는 롤은 권한오브젝트의 상위 개념으로 롤에 T-CODE 를 추가하여 프로그램별 제어를 할 수 있으며, 권한 오브젝트를 지정하여 오브젝트별로 권한제어가 가능하다.. 프로젝트에 참여하게 되면 사용자 롤 권한작업이 몇 달이 소요될 정도로 중요한 부분이라는 것을 알게 될 것 이다. [ 그림 2-3] 을 통하여 ROLE 과 Authority 의 관계를 파악하자 ▲그림 2-3. ROLE-AUTHORITY 구조 Comment User master recordThese enable the user to log onto the SAP System and allow access to the functions and objects in it within the limits of the authorization profiles specified in the role. The user master record contains all information about the corresponding user, including the authorizations. Changes only take effect when the user next logs on to the system. Users who are logged on when the change takes place are not affected in their current session. Single roleIs created with the profile generator and allows the automatic generation of an authorization profile. The role contains the authorization data and the logon menu for the user. Composite roleConsists of any number of single roles. Generated authorization profile Is generated in role maintenance from the role data. Chapter 6. 권한관리 2. 권한 오브젝트 생성 Chapter 6. 권한관리

9 8 Manual authorization profile To minimize the maintenance effort if you are using authorization profiles, do not usually enter single authorizations in the user master record, but rather authorizations combined into authorization profiles. Changes to the authorization rights take effect for all users whose user master record contains the profile the next time they log on to the system. Users who are already logged on are not immediately affected by the changes. We strongly recommend that you do not assign profiles manually, but rather do so automatically with the profile generator. Composite profileConsists of any number of authorization profiles. AuthorizationDefinition of an authorization object, that is, a combination of permissible values in each authorization field of an authorization object. An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values. Authorizations allow you to specify any number of single values or value ranges for a field of an authorization object. You can also allow all values, or allow an empty field as a permissible value. If you change authorizations, all users whose authorization profile contains these authorizations are affected. As a system administrator, you can change authorizations in the following ways: You can extend and change the SAP defaults with role maintenance. You can change authorizations manually. These changes take effect for the relevant users as soon as you activate the authorization. The programmer of a function decides whether, where and how authorizations are to be checked. The program determines whether the user has sufficient authorization for a particular activity. To do this, it compares the field values specified in the program with the values contained in the authorizations of the user master record. The line of the authorization is colored yellow in the profile generator. Authorization ObjectAn authorization object groups up to ten fields that are related by AND. An authorization object allows complex tests of an authorization for multiple conditions. Authorizations allow users to execute actions within the system. For an authorization check to be successful, all field values of the authorization object must be appropriately maintained in the user master. Authorization objects are divided into classes for comprehensibility. An object class is a logical combination of authorization objects and corresponds, for example, to an application (financial accounting, human resources, and so on). The line of the authorization object class is colored orange in the profile generator. For information about maintaining the authorization values, double click an authorization object. The line of the authorization object is colored green in the profile generator. Authorization fieldsContains the value that you defined. It is connected to the data elements stored with the ABAP Dictionary. ▲표 2-1. 그림 2-3 의 설명 Chapter 6. 권한관리 2. 권한 오브젝트 생성 Chapter 6. 권한관리

10 9 ▲그림 2-6. 권한 클래스 생성 6-1. 서브폴더 생성 및 권한 오브젝트의 순서 이동을 할 수 있다. 6-2. 트랜잭션, SAP Query 등을 롤에 추가 할 수 있다. 6-3. 다른 항목 ( 롤, 메뉴 ) 에서 복사할 수 있다. ▲그림 2-7. 권한 TAB 7. Authorization TAB 에서 앞에서 생성한 Z_TEST 권한 오브젝트를 추가하자. 변경 버튼을 클릭하여 오픈되는 창에서 사용자에 대한 기본권한을 선택 후 참조채택을 선택하자. 1 3 2 1 Chapter 6. 권한관리 2. 권한 오브젝트 생성 Chapter 6. 권한관리

11 10 ▲그림 2-8. 권한 오브젝트 추가 8-1. Selection criteria 클릭하여 밑으로 내려가면 앞에서 생성한 Z_TEST 오브젝트를 확인할 수 있다. 8-2.‘-’ 모양의 아이콘을 클릭하여 ‘+’ 로 변경 후 삽입선택을 클릭한다. ▲그림 2-9. ACTIVITY 와 권한조건 추가 9-1. Activity 를 추가해주자. [ 그림 2-4] 에서 추가해주었던 생성, 변경, 조회 액티비티가 조회된다. 모드 선택하고 저장한다. 9-2. 항공사 ID(CARRID) 를 변경 버튼을 클릭하여 조건 값을 입력한다. 테스트를 위해 ‘AA’ 만 입력한다. 1 2 1 2 Chapter 6. 권한관리 2. 권한 오브젝트 생성 Chapter 6. 권한관리

12 11 ▲그림 2-10. PROFILE Generate 10. Profile generator 버튼을 클릭하면 자동으로 Profile name 이 생성된다. ▲그림 2-11. 롤에 사용자 추가하기 11-1. 사용자 탭으로 이동하여 ROLE 을 적용할 사용자를 입력한다. 사용자 비교를 클릭 후 User comparison 를 선택한다. “User comparison” 버튼을 눌러야 해당 사용자에게 ROLE 이 부여된다. 1 Chapter 6. 권한관리 2. 권한 오브젝트 생성 Chapter 6. 권한관리

13 12 ▶그림 2-12. USER ROLE 조회 12. SU01 로 이동하면 ROLE 과 Profile 이 자동으로 추가된 것을 확인할 수 있다. ▶그림 2-13. USER PROFILE 조회 Chapter 6. 권한관리 2. 권한 오브젝트 생성 Chapter 6. 권한관리

14 13 3. 프로그램 작성 REPORT Z06_001 MESSAGE-ID ZTEST. PARAMETERS pa_carr TYPE sflight-carrid. DATA wa_flights TYPE demo_focc. AT SELECTION-SCREEN. AUTHORITY-CHECK OBJECT 'Z_TEST' ID 'CARRID' FIELD pa_carr ID 'ACTVT' FIELD '03'. IF sy-subrc = 4. MESSAGE e000 WITH 'you need a authority'. ELSEIF sy-subrc = 0. MESSAGE s000 WITH 'SUCCESS'. ENDIF. START-OF-SELECTION. SELECT carrid connid fldate seatsmax seatsocc FROM sflight INTO CORRESPONDING FIELDS OF wa_flights WHERE carrid = pa_carr. WRITE: / wa_flights-carrid, wa_flights-connid, wa_flights-fldate, wa_flights-seatsmax, wa_flights-seatsocc. ENDSELECT. 예제 6-3-1 Chapter 6. 권한관리 3. 프로그램 작성 Chapter 6. 권한관리

15 14 결과 3-2 ‘AA’ 값을 입력하고 실행하면 ‘SUCCESS’ 메시지가 보이고, 이외 값은 에러 메시지가 보임을 확인 할 수 있다. [ 그림 2-9] 에서 ACTIVITY 에 조회권한을 삭제하고 조회도 해보고, 값을 변경해가면서 테스트 해보면 권한 오브젝트에 대한 개념을 확실히 이해할 수 있을 것이다. Chapter 6. 권한관리 3. 프로그램 작성 Chapter 6. 권한관리


Download ppt "1 Chapter 6. 권한관리 1. OVERVIEW Authorization Check 의 정의 SAP 에서 권한의 부여는 기본적으로 Transaction 단위로 이루어진다. 만약 권한을 부여 받지 못한 사용자가 Transaction 을 접근하는 경우 접근 거부를 나타내는."

Similar presentations


Ads by Google