← Documents Documentation/netlabel/lsm_interface.rst GitHub 원문 ↗

Linux 6.18.37 · NetLabel

NetLabel Linux Security Module Interface

LSM이 NetLabel 보안 속성, 패킷 연산, 라벨 매핑 캐시를 사용하는 방법을 설명합니다.

Source pathDocumentation/netlabel/lsm_interface.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

lsm_interface.rst:1-53

LSM은 `netlbl_lsm_secattr`이라는 공통 보안 속성 표현을 사용해 여러 패킷 라벨링 프로토콜을 동일한 API로 다룹니다. 최초 패킷에서는 라벨 해독과 LSM 식별자 변환이 필요하지만, 만들어진 매핑을 캐시에 넣으면 이후 일치 패킷에서 두 변환을 모두 생략할 수 있습니다.

NetLabel LSM 변환과 캐시
수신 패킷 라벨NetLabel 프로토콜 해석`netlbl_lsm_secattr`LSM 보안 식별자매핑 캐시 등록
다음 일치 패킷매핑 캐시 적중NetLabel·LSM 변환 생략LSM 보안 식별자

최초 해석 경로와 캐시 적중 경로를 비교합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 ========================================
2 NetLabel Linux Security Module Interface
3 ========================================
4
5 Paul Moore, [email protected]
6
7 May 17, 2006
8
9 Overview
10 ========
11
12 NetLabel is a mechanism which can set and retrieve security attributes from
13 network packets. It is intended to be used by LSM developers who want to make
14 use of a common code base for several different packet labeling protocols.
15 The NetLabel security module API is defined in 'include/net/netlabel.h' but a
16 brief overview is given below.
17
18 NetLabel Security Attributes
19 ============================
20
21 Since NetLabel supports multiple different packet labeling protocols and LSMs
22 it uses the concept of security attributes to refer to the packet's security
23 labels. The NetLabel security attributes are defined by the
24 'netlbl_lsm_secattr' structure in the NetLabel header file. Internally the
25 NetLabel subsystem converts the security attributes to and from the correct
26 low-level packet label depending on the NetLabel build time and run time
27 configuration. It is up to the LSM developer to translate the NetLabel
28 security attributes into whatever security identifiers are in use for their
29 particular LSM.
30
31 NetLabel LSM Protocol Operations
32 ================================
33
34 These are the functions which allow the LSM developer to manipulate the labels
35 on outgoing packets as well as read the labels on incoming packets. Functions
36 exist to operate both on sockets as well as the sk_buffs directly. These high
37 level functions are translated into low level protocol operations based on how
38 the administrator has configured the NetLabel subsystem.
39
40 NetLabel Label Mapping Cache Operations
41 =======================================
42
43 Depending on the exact configuration, translation between the network packet
44 label and the internal LSM security identifier can be time consuming. The
45 NetLabel label mapping cache is a caching mechanism which can be used to
46 sidestep much of this overhead once a mapping has been established. Once the
47 LSM has received a packet, used NetLabel to decode its security attributes,
48 and translated the security attributes into a LSM internal identifier the LSM
49 can use the NetLabel caching functions to associate the LSM internal
50 identifier with the network packet's label. This means that in the future
51 when a incoming packet matches a cached value not only are the internal
52 NetLabel translation mechanisms bypassed but the LSM translation mechanisms are
53 bypassed as well which should result in a significant reduction in overhead.
54

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

개요

1-16

NetLabel Linux Security Module 인터페이스

Paul Moore, `[email protected]`

2006년 5월 17일

개요

NetLabel은 네트워크 패킷에서 보안 속성을 설정하고 가져올 수 있는 메커니즘입니다. 여러 패킷 라벨링 프로토콜에 공통 코드 기반을 사용하려는 LSM 개발자를 위해 만들어졌습니다. NetLabel 보안 모듈 API는 `include/net/netlabel.h`에 정의되어 있으며, 아래에서는 이를 간략히 소개합니다.

========================================
NetLabel Linux Security Module Interface
========================================

Paul Moore, [email protected]

May 17, 2006

Overview
========

NetLabel is a mechanism which can set and retrieve security attributes from
network packets.  It is intended to be used by LSM developers who want to make
use of a common code base for several different packet labeling protocols.
The NetLabel security module API is defined in 'include/net/netlabel.h' but a
brief overview is given below.

NetLabel 보안 속성

17-30

NetLabel 보안 속성

NetLabel은 서로 다른 여러 패킷 라벨링 프로토콜과 LSM을 지원하므로, 패킷의 보안 라벨을 가리킬 때 보안 속성이라는 개념을 사용합니다. NetLabel 보안 속성은 NetLabel 헤더 파일의 `netlbl_lsm_secattr` 구조체로 정의됩니다.

NetLabel 하위 시스템은 빌드 시점 및 실행 시점 구성에 따라 보안 속성을 올바른 저수준 패킷 라벨로 변환하거나 그 반대로 변환합니다. 각 LSM에서 사용하는 보안 식별자와 NetLabel 보안 속성 사이의 변환은 LSM 개발자가 담당합니다.


NetLabel Security Attributes
============================

Since NetLabel supports multiple different packet labeling protocols and LSMs
it uses the concept of security attributes to refer to the packet's security
labels.  The NetLabel security attributes are defined by the
'netlbl_lsm_secattr' structure in the NetLabel header file.  Internally the
NetLabel subsystem converts the security attributes to and from the correct
low-level packet label depending on the NetLabel build time and run time
configuration.  It is up to the LSM developer to translate the NetLabel
security attributes into whatever security identifiers are in use for their
particular LSM.

LSM 프로토콜 연산

31-39

NetLabel LSM 프로토콜 연산

이 함수들은 LSM 개발자가 송신 패킷의 라벨을 조작하고 수신 패킷의 라벨을 읽을 수 있게 합니다. 소켓과 `sk_buff`를 직접 대상으로 하는 함수가 모두 제공됩니다. 이 고수준 함수는 관리자가 NetLabel 하위 시스템을 구성한 방식에 따라 저수준 프로토콜 연산으로 변환됩니다.

NetLabel LSM Protocol Operations
================================

These are the functions which allow the LSM developer to manipulate the labels
on outgoing packets as well as read the labels on incoming packets.  Functions
exist to operate both on sockets as well as the sk_buffs directly.  These high
level functions are translated into low level protocol operations based on how
the administrator has configured the NetLabel subsystem.

라벨 매핑 캐시 연산

40-53

NetLabel 라벨 매핑 캐시 연산

구성에 따라 네트워크 패킷 라벨과 LSM 내부 보안 식별자 사이의 변환에는 많은 시간이 들 수 있습니다. NetLabel 라벨 매핑 캐시는 매핑이 한 번 만들어진 뒤 이러한 오버헤드의 상당 부분을 피할 수 있게 하는 캐시 메커니즘입니다.

LSM이 패킷을 받아 NetLabel로 보안 속성을 해독하고 이를 LSM 내부 식별자로 변환한 뒤에는, NetLabel 캐시 함수를 사용해 그 내부 식별자를 네트워크 패킷 라벨과 연결할 수 있습니다. 이후 수신 패킷이 캐시된 값과 일치하면 NetLabel 내부 변환과 LSM 변환을 모두 건너뛸 수 있으므로 오버헤드가 크게 줄어듭니다.

NetLabel Label Mapping Cache Operations
=======================================

Depending on the exact configuration, translation between the network packet
label and the internal LSM security identifier can be time consuming.  The
NetLabel label mapping cache is a caching mechanism which can be used to
sidestep much of this overhead once a mapping has been established.  Once the
LSM has received a packet, used NetLabel to decode its security attributes,
and translated the security attributes into a LSM internal identifier the LSM
can use the NetLabel caching functions to associate the LSM internal
identifier with the network packet's label.  This means that in the future
when a incoming packet matches a cached value not only are the internal
NetLabel translation mechanisms bypassed but the LSM translation mechanisms are
bypassed as well which should result in a significant reduction in overhead.