placet 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 40264b6092cdd9603f06a99d7a319bc53bfc3e309ff1457dce7f943f22ea3b70
4
+ data.tar.gz: e35bb7aa9e234acb23f57dbac7a0c01457746f772f548d62d84c90471b1ef279
5
+ SHA512:
6
+ metadata.gz: 2a842d373a4144dff69a586e1424774e7af86196f393f015bb6388013565f2557ce938d8d26452d192f634bf16297adf46d3ef3cd259de8a3e7a465fbc839d28
7
+ data.tar.gz: 0cfa85a2a33f3de96cd5366940a93f183f655e8ee58263bff0a920b4b5e386b2511c2a57a78785f818045e9826072cc4819188894285afe7deaef07554a36072
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yugo TERADA
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # placet
2
+
3
+ > 宣言的な権限管理ライブラリ — simplified IAM-style authorization(コンセプト策定中)
4
+
5
+ placet は、AWS IAM の権限モデル(principal への policy アタッチ、explicit deny の優先、implicit deny)を簡略化し、一般のアプリケーションに導入できるようにすることを目指す権限管理ライブラリです。評価器の内部構造は XACML のアーキテクチャ(PEP / PDP / PIP / PAP の役割分離)を参考にしています。
6
+
7
+ 現在は**コンセプト策定フェーズ**であり、実装はまだありません。設計の全体と各判断の経緯は [docs/concept.md](docs/concept.md) にまとまっています。
8
+
9
+ ## モデルの概要
10
+
11
+ - アクセスユーザーは、`user:42` / `role:editor` / `tenant:acme` のような複数の **principal**(主体の「面」)を持ち、アプリケーション DB の情報から導出される
12
+ - 操作は `post:view` のような **action** で表され、action に対する allow / deny の集合が **policy** として principal にアタッチされる
13
+ - 決定は **deny-overrides**(1 つでも deny があれば拒否)と **implicit deny**(どこにもマッチしなければ拒否)に固定され、常に「どの policy のどの statement が決め手か」という根拠つきで返される
14
+
15
+ ```yaml
16
+ policies:
17
+ - name: post-editor
18
+ statements:
19
+ - effect: allow
20
+ actions: [post:create, post:update, post:delete]
21
+
22
+ - name: suspended
23
+ statements:
24
+ - effect: deny
25
+ actions: ["*"]
26
+
27
+ attachments:
28
+ - principal: role:editor
29
+ policies: [post-editor]
30
+ - principal: flag:suspended
31
+ policies: [suspended]
32
+ ```
33
+
34
+ `role:editor` を持つユーザーの `post:update` は許可され、凍結されたユーザー(`flag:suspended` の面を持つユーザー)は allow の有無にかかわらず全操作が拒否されます。
35
+
36
+ ## 設計上の特徴
37
+
38
+ - **結合則は deny-overrides のみ** — 設定による差し替えを提供しない。Policy を読めば結果が一意に予測できる
39
+ - **動的な状態は principal 導出で吸収する** — Policy と attachment は静的でデプロイ時に固定。実行時に変わるのはユーザーの principal 集合だけ
40
+ - **リソース個体認可は関係 principal(簡易 ReBAC)** — 「作成者本人のみ編集可」を `rel:owner` のような関係の面として表現し、評価器の仕様は変えない
41
+ - **一覧フィルタリングを仕様に含む** — 「閲覧できるものだけを返す」を、関係ごとの scope の和・差として DB クエリに合成する
42
+ - **言語非依存の 3 層構造** — コア仕様(フォーマット + 評価セマンティクス + 適合性テスト)/ 言語ランタイム / ORM・フレームワークアダプタ
43
+
44
+ ## ステータス
45
+
46
+ - [x] コンセプトと設計判断の整理([docs/concept.md](docs/concept.md))
47
+ - [ ] 正規形の JSON Schema
48
+ - [ ] リファレンス実装(Ruby ランタイム + 適合性 fixture)
49
+
50
+ ## 名前について
51
+
52
+ placet はラテン語で「可とする」。大学や教会の採決で用いられる placet / non placet(可 / 否)に由来します。読みは「プラケット」です。
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Placet
4
+ VERSION = "0.0.1"
5
+ end
data/lib/placet.rb ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "placet/version"
4
+
5
+ raise NotImplementedError,
6
+ "placet is not implemented yet — this version is a placeholder to reserve the gem name. " \
7
+ "See https://github.com/aspick/placet for the concept and roadmap."
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: placet
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Yugo TERADA
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-07-11 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: placet is a declarative authorization library that brings a simplified
14
+ AWS IAM-style model (principals, policy attachments, deny-overrides, implicit deny)
15
+ to ordinary applications. This version is a placeholder to reserve the gem name
16
+ while the specification is being designed.
17
+ email:
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - LICENSE
23
+ - README.md
24
+ - lib/placet.rb
25
+ - lib/placet/version.rb
26
+ homepage: https://github.com/aspick/placet
27
+ licenses:
28
+ - MIT
29
+ metadata:
30
+ homepage_uri: https://github.com/aspick/placet
31
+ source_code_uri: https://github.com/aspick/placet
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubygems_version: 3.4.18
48
+ signing_key:
49
+ specification_version: 4
50
+ summary: Declarative authorization library — simplified IAM-style policy evaluation
51
+ (concept phase; placeholder release)
52
+ test_files: []