所属するグループ及び個人の属性情報によって, 人事ファイルへのアクセスをコントロールするシステムがある。人事部グループの属性情報と, そこに所属する4人の個人の属性情報が次の条件の場合, 人事ファイルを参照又は更新可能な人数の組合せはどれか。 〔条件〕 (1) 属性情報は3ビットで表される。 (2) 各ビットは, 左から順に参照, 更新, 追加・削除に対応し, 1が許可, 0が禁止を意味する。 (3) グループの属性情報は, 個人の属性情報が登録されていない場合にだけ適用される。 (4) グループと個人の属性情報は次のとおりとする。 人事部グループ : 110 Aさん : 100 Bさん : 110 Cさん : 001 Dさん : 未登録
平成21年度 春期 ITパスポート試験 問62
This question's explanation and your answers so far.
問 62
Incorrectア
Reference 2 people, update 1 person. This is the value you get when the unregistered D is left out of the count. By condition (3), the group attribute 110 applies as it is to D, whose individual attribute information is not registered, so D must also be counted as able to reference and able to update. If D is excluded, reference becomes only A and B, which is 2 people, and update becomes only B, which is 1 person, giving exactly the numbers in this choice.
Incorrectイ
Reference 2 people, update 2 people. The 2 people for update (B and D) are correct, but the reference count is one person short. The reference bit is 1 for A (100), B (110), and D (to whom the group attribute 110 applies), which is 3 people; A is prohibited from updating, but reference is permitted. If you also drop a person who cannot update from the reference count, you get this incorrect combination.
Incorrectウ
Reference 3 people, update 1 person. The 3 people for reference (A, B, D) are correct, but the update count is one person short. The group attribute 110 applies to the unregistered D, and its middle update bit is 1, so D can update as well. If you overlook the update permission of D and count only B as able to update, you get this incorrect combination.
- エ
正解 The correct answer is エ (3 people can reference, 2 people can update). By condition (2), the 3 bits of attribute information represent, from left to right, reference, update, and add/delete, where 1 means permitted and 0 means prohibited. Determining the attributes actually applied to each person according to condition (3) gives the following. A = 100 has registered individual attributes, so they apply as they are, and only reference is permitted (the update bit is 0, so it is prohibited). B = 110 is also registered, so both reference and update are permitted. C = 001 is registered, and the only permitted operation is the rightmost add/delete, so both reference and update are prohibited. D is not registered, so by condition (3) the group attribute 110 applies, and reference and update are permitted. Counting them up, the reference bit is 1 for A, B, and D, which is 3 people, and the update bit is 1 for B and D, which is 2 people. The combination is therefore エ, reference 3 people and update 2 people. There are two points to watch. First, do not add the group attribute on top for a person whose individual attributes are registered; condition (3) says it applies only when the individual attributes are not registered, so it is an exclusive application, not an overwrite. Second, the rightmost bit is add/delete, which has nothing to do with what this question counts (reference and update), so the 001 of C is not counted for either reference or update.
- When access rights are expressed as a bit string, the first step is to read correctly which bit position corresponds to which operation (here, from left to right: reference, update, add/delete) and the convention that 1 means permitted and 0 means prohibited. You only need to count down the column the bits that correspond to the operation the question asks about; even when an unrelated bit is set, as in the 001 of C, it is not included in the reference or update count.
- Apply the precedence between group permissions and individual permissions exactly as the conditions state. Condition (3) in this question is the exclusive rule that the group attribute is applied only when the individual attribute information is not registered, so for registered people you use only their individual attributes, and you apply the group attribute 110 only to the unregistered D. Adding the two together, or conversely always giving the group attribute priority, leads to a wrong head count.