Skip to content

Commit 8c8954b

Browse files
misc: Rename Whitelist to Allowlist (#150)
1 parent b81d569 commit 8c8954b

4 files changed

Lines changed: 78 additions & 56 deletions

File tree

CHANGES.ja.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
変更点
22
======
33

4+
- `Service` クラス
5+
* `isCimdAllowlistEnabled()` メソッドを追加。
6+
* `setCimdAllowlistEnabled(boolean)` メソッドを追加。
7+
* `getCimdAllowlist()` メソッドを追加。
8+
* `setCimdAllowlist(String[])` メソッドを追加。
9+
* `isCimdWhitelistEnabled()` メソッドを削除。
10+
* `setCimdWhitelistEnabled(boolean)` メソッドを削除。
11+
* `getCimdWhitelist()` メソッドを削除。
12+
* `setCimdWhitelist(String[])` メソッドを削除。
13+
14+
415
4.30 (2025 年 11 月 20 日)
516
--------------------------
617

CHANGES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
CHANGES
22
=======
33

4+
- `Service` class
5+
* Added the `isCimdAllowlistEnabled()` method.
6+
* Added the `setCimdAllowlistEnabled(boolean)` method.
7+
* Added the `getCimdAllowlist()` method.
8+
* Added the `setCimdAllowlist(String[])` method.
9+
* Removed the `isCimdWhitelistEnabled()` method.
10+
* Removed the `setCimdWhitelistEnabled(boolean)` method.
11+
* Removed the `getCimdWhitelist()` method.
12+
* Removed the `setCimdWhitelist(String[])` method.
13+
14+
415
4.30 (2025-11-20)
516
-----------------
617

src/main/java/com/authlete/common/dto/CimdOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ public CimdOptions setAlwaysRetrieved(boolean always)
182182
*
183183
* <p>
184184
* Given this purpose, it is not recommended to enable this option in
185-
* production environments unless a whitelist is used (see {@link
186-
* Service#isCimdWhitelistEnabled()}).
185+
* production environments unless an allowlist is used (see {@link
186+
* Service#isCimdAllowlistEnabled()}).
187187
* </p>
188188
*
189189
* <p>
@@ -216,8 +216,8 @@ public boolean isHttpPermitted()
216216
*
217217
* <p>
218218
* Given this purpose, it is not recommended to enable this option in
219-
* production environments unless a whitelist is used (see {@link
220-
* Service#isCimdWhitelistEnabled()}).
219+
* production environments unless an allowlist is used (see {@link
220+
* Service#isCimdAllowlistEnabled()}).
221221
* </p>
222222
*
223223
* <p>

src/main/java/com/authlete/common/dto/Service.java

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@
330330
*/
331331
public class Service implements Serializable
332332
{
333-
private static final long serialVersionUID = 86L;
333+
private static final long serialVersionUID = 87L;
334334

335335

336336
/*
@@ -1905,21 +1905,21 @@ public class Service implements Serializable
19051905

19061906

19071907
/**
1908-
* Whether to enable the whitelist for client IDs in the CIMD context.
1908+
* Whether to enable the allowlist for client IDs in the CIMD context.
19091909
*
1910-
* @since 4.30
1910+
* @since 4.31
19111911
* @since Authlete 3.0.22
19121912
*/
1913-
private boolean cimdWhitelistEnabled;
1913+
private boolean cimdAllowlistEnabled;
19141914

19151915

19161916
/**
1917-
* The whitelist for client IDs in the CIMD context.
1917+
* The allowlist for client IDs in the CIMD context.
19181918
*
1919-
* @since 4.30
1919+
* @since 4.31
19201920
* @since Authlete 3.0.22
19211921
*/
1922-
private String[] cimdWhitelist;
1922+
private String[] cimdAllowlist;
19231923

19241924

19251925
/**
@@ -12251,162 +12251,162 @@ public Service setClientIdMetadataDocumentSupported(boolean supported)
1225112251

1225212252

1225312253
/**
12254-
* Get the flag that indicates whether the whitelist for client IDs
12254+
* Get the flag that indicates whether the allowlist for client IDs
1225512255
* in the <a href=
1225612256
* "https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/"
1225712257
* >CIMD</a> context is enabled or not.
1225812258
*
1225912259
* <p>
12260-
* If the whitelist is enabled, the client ID in a request must match at
12261-
* least one entry in the whitelist to be considered a valid client ID
12260+
* If the allowlist is enabled, the client ID in a request must match at
12261+
* least one entry in the allowlist to be considered a valid client ID
1226212262
* in the CIMD context.
1226312263
* </p>
1226412264
*
1226512265
* @return
12266-
* {@code true} if the whitelist for client IDs in the CIMD
12266+
* {@code true} if the allowlist for client IDs in the CIMD
1226712267
* context is enabled.
1226812268
*
12269-
* @since 4.30
12269+
* @since 4.31
1227012270
* @since Authlete 3.0.22
1227112271
*
1227212272
* @see <a href="https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/">
1227312273
* OAuth Client ID Metadata Document</a>
1227412274
*/
12275-
public boolean isCimdWhitelistEnabled()
12275+
public boolean isCimdAllowlistEnabled()
1227612276
{
12277-
return cimdWhitelistEnabled;
12277+
return cimdAllowlistEnabled;
1227812278
}
1227912279

1228012280

1228112281
/**
12282-
* Set the flag that indicates whether the whitelist for client IDs
12282+
* Set the flag that indicates whether the allowlist for client IDs
1228312283
* in the <a href=
1228412284
* "https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/"
1228512285
* >CIMD</a> context is enabled or not.
1228612286
*
1228712287
* <p>
12288-
* If the whitelist is enabled, the client ID in a request must match at
12289-
* least one entry in the whitelist to be considered a valid client ID
12288+
* If the allowlist is enabled, the client ID in a request must match at
12289+
* least one entry in the allowlist to be considered a valid client ID
1229012290
* in the CIMD context.
1229112291
* </p>
1229212292
*
1229312293
* @param enabled
12294-
* {@code true} to enable the whitelist for client IDs in the
12294+
* {@code true} to enable the allowlist for client IDs in the
1229512295
* CIMD context.
1229612296
*
1229712297
* @return
1229812298
* {@code this} object.
1229912299
*
12300-
* @since 4.30
12300+
* @since 4.31
1230112301
* @since Authlete 3.0.22
1230212302
*
1230312303
* @see <a href="https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/">
1230412304
* OAuth Client ID Metadata Document</a>
1230512305
*/
12306-
public Service setCimdWhitelistEnabled(boolean enabled)
12306+
public Service setCimdAllowlistEnabled(boolean enabled)
1230712307
{
12308-
this.cimdWhitelistEnabled = enabled;
12308+
this.cimdAllowlistEnabled = enabled;
1230912309

1231012310
return this;
1231112311
}
1231212312

1231312313

1231412314
/**
12315-
* Get the whitelist for client IDs in the <a href=
12315+
* Get the allowlist for client IDs in the <a href=
1231612316
* "https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/"
1231712317
* >CIMD</a> context.
1231812318
*
1231912319
* <p>
12320-
* When the whitelist feature is enabled (see {@link #isCimdWhitelistEnabled()}),
12321-
* the whitelist specified by this property is consulted to determine
12320+
* When the allowlist feature is enabled (see {@link #isCimdAllowlistEnabled()}),
12321+
* the allowlist specified by this property is consulted to determine
1232212322
* whether the client ID in a request is valid in the CIMD context.
1232312323
* In this case, the client ID must match at least one entry in the
12324-
* whitelist.
12324+
* allowlist.
1232512325
* </p>
1232612326
*
1232712327
* <p>
12328-
* Each entry in the whitelist must be a valid URI. The comparison between
12329-
* a whitelist entry and a client ID is performed as follows:
12328+
* Each entry in the allowlist must be a valid URI. The comparison between
12329+
* an allowlist entry and a client ID is performed as follows:
1233012330
* </p>
1233112331
*
1233212332
* <ol>
1233312333
* <li>[scheme] Simple string comparison.
1233412334
* <li>[authority] Simple string comparison.
1233512335
* <li>[path] The client ID's path must contain all path segments of
12336-
* the whitelist entry in the same order.
12337-
* <li>[query] Simple string comparison, but only if the whitelist
12336+
* the allowlist entry in the same order.
12337+
* <li>[query] Simple string comparison, but only if the allowlist
1233812338
* entry has a query component.
1233912339
* </ol>
1234012340
*
1234112341
* <p>
12342-
* For example, if the whitelist contains "{@code https://example.com/a/b}",
12342+
* For example, if the allowlist contains "{@code https://example.com/a/b}",
1234312343
* then "{@code https://example.com/a/b/c}" is considered valid, but
1234412344
* "{@code https://example.com/a}" is not.
1234512345
* </p>
1234612346
*
1234712347
* @return
12348-
* The whitelist for client IDs in the CIMD context.
12348+
* The allowlist for client IDs in the CIMD context.
1234912349
*
12350-
* @since 4.30
12350+
* @since 4.31
1235112351
* @since Authlete 3.0.22
1235212352
*
1235312353
* @see <a href="https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/">
1235412354
* OAuth Client ID Metadata Document</a>
1235512355
*/
12356-
public String[] getCimdWhitelist()
12356+
public String[] getCimdAllowlist()
1235712357
{
12358-
return cimdWhitelist;
12358+
return cimdAllowlist;
1235912359
}
1236012360

1236112361

1236212362
/**
12363-
* Set the whitelist for client IDs in the <a href=
12363+
* Set the allowlist for client IDs in the <a href=
1236412364
* "https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/"
1236512365
* >CIMD</a> context.
1236612366
*
1236712367
* <p>
12368-
* When the whitelist feature is enabled (see {@link #isCimdWhitelistEnabled()}),
12369-
* the whitelist specified by this property is consulted to determine
12368+
* When the allowlist feature is enabled (see {@link #isCimdAllowlistEnabled()}),
12369+
* the allowlist specified by this property is consulted to determine
1237012370
* whether the client ID in a request is valid in the CIMD context.
1237112371
* In this case, the client ID must match at least one entry in the
12372-
* whitelist.
12372+
* allowlist.
1237312373
* </p>
1237412374
*
1237512375
* <p>
12376-
* Each entry in the whitelist must be a valid URI. The comparison between
12377-
* a whitelist entry and a client ID is performed as follows:
12376+
* Each entry in the allowlist must be a valid URI. The comparison between
12377+
* an allowlist entry and a client ID is performed as follows:
1237812378
* </p>
1237912379
*
1238012380
* <ol>
1238112381
* <li>[scheme] Simple string comparison.
1238212382
* <li>[authority] Simple string comparison.
1238312383
* <li>[path] The client ID's path must contain all path segments of
12384-
* the whitelist entry in the same order.
12385-
* <li>[query] Simple string comparison, but only if the whitelist
12384+
* the allowlist entry in the same order.
12385+
* <li>[query] Simple string comparison, but only if the allowlist
1238612386
* entry has a query component.
1238712387
* </ol>
1238812388
*
1238912389
* <p>
12390-
* For example, if the whitelist contains "{@code https://example.com/a/b}",
12390+
* For example, if the allowlist contains "{@code https://example.com/a/b}",
1239112391
* then "{@code https://example.com/a/b/c}" is considered valid, but
1239212392
* "{@code https://example.com/a}" is not.
1239312393
* </p>
1239412394
*
12395-
* @param whitelist
12396-
* The whitelist for client IDs in the CIMD context.
12395+
* @param allowlist
12396+
* The allowlist for client IDs in the CIMD context.
1239712397
*
1239812398
* @return
1239912399
* {@code this} object.
1240012400
*
12401-
* @since 4.30
12401+
* @since 4.31
1240212402
* @since Authlete 3.0.22
1240312403
*
1240412404
* @see <a href="https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/">
1240512405
* OAuth Client ID Metadata Document</a>
1240612406
*/
12407-
public Service setCimdWhitelist(String[] whitelist)
12407+
public Service setCimdAllowlist(String[] allowlist)
1240812408
{
12409-
this.cimdWhitelist = whitelist;
12409+
this.cimdAllowlist = allowlist;
1241012410

1241112411
return this;
1241212412
}
@@ -12559,8 +12559,8 @@ public Service setCimdAlwaysRetrieved(boolean always)
1255912559
*
1256012560
* <p>
1256112561
* Given this purpose, it is not recommended to enable this option in
12562-
* production environments unless a whitelist is used (see {@link
12563-
* Service#isCimdWhitelistEnabled()}).
12562+
* production environments unless an allowlist is used (see {@link
12563+
* Service#isCimdAllowlistEnabled()}).
1256412564
* </p>
1256512565
*
1256612566
* <p>
@@ -12602,8 +12602,8 @@ public boolean isCimdHttpPermitted()
1260212602
*
1260312603
* <p>
1260412604
* Given this purpose, it is not recommended to enable this option in
12605-
* production environments unless a whitelist is used (see {@link
12606-
* Service#isCimdWhitelistEnabled()}).
12605+
* production environments unless an allowlist is used (see {@link
12606+
* Service#isCimdAllowlistEnabled()}).
1260712607
* </p>
1260812608
*
1260912609
* <p>

0 commit comments

Comments
 (0)