@things-factory/auth-base 6.2.84 → 6.2.96

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.
@@ -0,0 +1,13 @@
1
+ # SECRET
2
+
3
+ 모든 어플리케이션은 아래 샘플과 같이 독자적인 SECRET 키를 지정하여야 한다.
4
+ 이 설정은 인증을 위한 jwt key 생성시 암호화를 위한 SEED로 사용된다.
5
+ 따라서, 새로 디플로이된 곳에 독자적인 SECRET 키를 새로 지정하지 않으면, (이미 알려져있을 수 있는) 디폴트 값이 사용되므로 보안에 취약해질 수 있다.
6
+
7
+ ## default
8
+
9
+ ```
10
+ module.exports = {
11
+ SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dAC95',
12
+ }
13
+ ```
@@ -0,0 +1,11 @@
1
+ # accessTokenCookieKey
2
+
3
+ 브라우저에서 쿠키를 활용해서 세션키를 저장하는 경우, 세션키로 활용될 고유한 쿠키의 키를 지정할 수 있다.
4
+
5
+ ## default
6
+
7
+ ```
8
+ module.exports = {
9
+ accessTokenCookieKey: 'access_token',
10
+ }
11
+ ```
@@ -0,0 +1,26 @@
1
+ # applianceJwtExpiresIn
2
+
3
+ 단말장치의 액세스토큰의 사용 유효기간을 설정한다.
4
+
5
+ - 설정값은 다음과 같은 여러 형태로 가능합니다.[참조](https://github.com/vercel/ms)
6
+
7
+ ```
8
+ 2 days // 2일
9
+ 1d // 하루
10
+ 10h // 10시간
11
+ 2.5 hrs // 2.5시간
12
+ 2h // 2시간
13
+ 1m // 1분
14
+ 5s // 5초
15
+ 1y // 1년
16
+ 10y // 10년
17
+ 100 // 100 미리초
18
+ ```
19
+
20
+ ## default
21
+
22
+ ```
23
+ module.exports = {
24
+ applianceJwtExpiresIn: '1y',
25
+ }
26
+ ```
@@ -0,0 +1,22 @@
1
+ # disableUserSignupProcess
2
+
3
+ - 이 설정이 true이면, 사용자가 어플리케이션에 접속해서 사용자 등록을 신청할 수 있으며, 이메일을 통해서 사용자를 검증하고 계정을 활성화할 수 있다.
4
+ - 이 설정이 false이면, 사용자가 직접 사용자 등록 신청을 할 수 없으며, 시스템의 관리자가 신규 사용자 계정을 등록해 줄 수 있다. 이 때에 사용되는 기본 패스워드는 password 설정의 defaultPassword 항목에 설정할 수 있다.
5
+ - 이 설정은 사용자 등록, 계정이 잠김 경우 재 활성화 요청, 패스워드를 기억하지 못하는 경우 이메일을 통한 패스워드 재 설정 등 모든 프로세스에 영향을 미친다.
6
+
7
+ ## default
8
+
9
+ ```
10
+ module.exports = {
11
+ password: {
12
+ ...,
13
+ defaultPassword: false
14
+ },
15
+ /*
16
+ Only When 'disableUserSignupProcess' is set to false,
17
+ a user-initiated user registration process is provided.
18
+ When this value is true, the 'defaultPassword' for the password must be configured.
19
+ */
20
+ disableUserSignupProcess: false,
21
+ }
22
+ ```
@@ -0,0 +1,44 @@
1
+ # i18n
2
+
3
+ - languages
4
+ - 다국어 환경에서 사용하고자 하는 언어팩들을 설정할 수 있다.
5
+ - defaultLanguage
6
+ - 사용자의 기본 언어 설정을 지정한다.
7
+ - 사용자가 특별히 선호하는 언어를 지정하지 않은 경우에 이 기본 언어 설정이 사용된다.
8
+ - disableUserFavoredLanguage
9
+ - 사용자가 선호하는 언어를 선택할 수 없도록 설정할 수 있다.
10
+ - 이 설정을 true로 하게되면, 사용자 프로필 메뉴에서 언어선택 기능이 보이지 않게된다.
11
+ - 모든 사용자들이 특정 언어만을 사용하도록 강제하고자 할 때 사용할 수 있다.
12
+
13
+ ## default
14
+
15
+ ```
16
+ module.exports = {
17
+ i18n: {
18
+ languages: [
19
+ {
20
+ code: 'en-US',
21
+ display: 'English'
22
+ },
23
+ {
24
+ code: 'ko-KR',
25
+ display: '한국어'
26
+ },
27
+ {
28
+ code: 'zh-CN',
29
+ display: '中文'
30
+ },
31
+ {
32
+ code: 'ja-JP',
33
+ display: 'にほんご'
34
+ },
35
+ {
36
+ code: 'ms-MY',
37
+ display: 'Bahasa Malaysia'
38
+ }
39
+ ],
40
+ defaultLanguage: 'en-US',
41
+ disableUserFavoredLanguage: false
42
+ }
43
+ }
44
+ ```
@@ -0,0 +1,65 @@
1
+ # password
2
+
3
+ 패스워드 설정 규칙을 유연하게 정의하고 이러한 규칙을 기반으로 패스워드를 유효성 검사할 수 있습니다.
4
+
5
+ 패스워드 규칙은 대/소문자, 숫자, 특수문자 및 길이와 같은 다양한 요소들을 조절할 수 있어 보안 정책에 맞게 패스워드 규칙을 커스터마이징할 수 있습니다.
6
+
7
+ - `lowerCase` (기본값: `true`):
8
+
9
+ - 소문자를 포함하는지 여부를 나타내는 부울 값입니다. 설정된 경우, 패스워드는 최소한 하나의 소문자를 포함해야 합니다.
10
+
11
+ - `upperCase` (기본값: `true`):
12
+
13
+ - 대문자를 포함하는지 여부를 나타내는 부울 값입니다. 설정된 경우, 패스워드는 최소한 하나의 대문자를 포함해야 합니다.
14
+
15
+ - `digit` (기본값: `true`):
16
+
17
+ - 숫자를 포함하는지 여부를 나타내는 부울 값입니다. 설정된 경우, 패스워드는 최소한 하나의 숫자를 포함해야 합니다.
18
+
19
+ - `specialCharacter` (기본값: `true`):
20
+
21
+ - 특수 문자를 포함하는지 여부를 나타내는 부울 값입니다. 설정된 경우, 패스워드는 최소한 하나의 특수 문자(!@#$%^&\*())를 포함해야 합니다.
22
+
23
+ - `allowRepeat` (기본값: `false`):
24
+
25
+ - 문자 반복을 허용하는지 여부를 나타내는 부울 값입니다. 설정된 경우, 패스워드에 문자가 두 번 이상 연속으로 반복되지 않아야 합니다.
26
+
27
+ - `useTightPattern` (기본값: `true`):
28
+
29
+ - 엄격한 패스워드 패턴을 사용할지 여부를 나타내는 부울 값입니다. 설정된 경우, 패스워드는 길이와 각 요소 (소문자, 대문자, 숫자, 특수 문자)에 대한 요구 사항을 엄격하게 따라야 합니다.
30
+
31
+ - `useLoosePattern` (기본값: `false`):
32
+
33
+ - 느슨한 패스워드 패턴을 사용할지 여부를 나타내는 부울 값입니다. 설정된 경우, 패스워드의 길이만 엄격하게 체크하고 다른 요소에 대한 요구 사항은 무시합니다.
34
+
35
+ - `tightCharacterLength` (기본값: `8`):
36
+
37
+ - 엄격한 패스워드 패턴을 사용할 경우, 패스워드의 최소 길이를 나타냅니다.
38
+
39
+ - `looseCharacterLength` (기본값: `15`):
40
+
41
+ - 느슨한 패스워드 패턴을 사용할 경우, 패스워드의 최소 길이를 나타냅니다.
42
+
43
+ - `defaultPassword` (기본값: false):
44
+ - 관리자가 사용자를 등록하는 경우, 새로운 사용자에게 설정되는 기본 패스워드이다.
45
+ - 이 값이 false 이면, 관리자가 사용자를 등록하는 기능은 사용할 수 없다.
46
+
47
+ ## default
48
+
49
+ ```
50
+ module.exports = {
51
+ password: {
52
+ lowerCase: true,
53
+ upperCase: false,
54
+ digit: true,
55
+ specialCharacter: true,
56
+ allowRepeat: true,
57
+ useTightPattern: true,
58
+ useLoosePattern: false,
59
+ tightCharacterLength: 8,
60
+ looseCharacterLength: 15,
61
+ history: 2,
62
+ defaultPassword: false
63
+ },
64
+ }
65
+ ```
@@ -0,0 +1,14 @@
1
+ # publicHomeRoute
2
+
3
+ 로그인되지 않은 사용자가 어플리케이션 URL에 처음 접근했을 때, 보여지게 될 페이지의 path를 지정한다.
4
+
5
+ 보통 '/public/home' 패스로 라우팅되어 인트로 화면을 볼 수 있다.
6
+ 만약, 로그인 페이지로 바로 이동하고 싶다면, 이 설정을 '/auth/signin' 으로 설정하면 된다.
7
+
8
+ ## default
9
+
10
+ ```
11
+ module.exports = {
12
+ publicHomeRoute: '/public/home',
13
+ }
14
+ ```
@@ -0,0 +1,49 @@
1
+ # session
2
+
3
+ 세션 유효기간과 관련한 설정을 할 수 있다.
4
+
5
+ - expirySeconds: Session Expiry Time in Seconds
6
+
7
+ - This value defines the duration in seconds after which a user session will expire due to inactivity.
8
+ - Setting this to 1800 means the session will expire after 30 minutes of inactivity.
9
+
10
+ - expiryPolicy: Session Expiry Policy
11
+
12
+ - This setting determines how the session timeout is managed.
13
+ - Options:
14
+
15
+ - 'rolling' - The session timeout is extended based on user activity.
16
+ Each new request resets the timer to the specified timeout duration.
17
+ - 'fixed' - The session timeout is fixed and based on the initial login time.
18
+ The session will expire after the specified duration, regardless of user activity.
19
+
20
+ Example:
21
+ expiryPolicy: 'rolling' or 'fixed'
22
+
23
+ ## default
24
+
25
+ ```
26
+ module.exports = {
27
+ session: {
28
+ /*
29
+ Session Expiry Time in Seconds
30
+ This value defines the duration in seconds after which a user session will expire due to inactivity.
31
+ Setting this to 1800 means the session will expire after 30 minutes of inactivity.
32
+ */
33
+ expirySeconds: 60 * 60 * 24 * 7,
34
+ /*
35
+ Session Expiry Policy
36
+ This setting determines how the session timeout is managed.
37
+ Options:
38
+ 'rolling' - The session timeout is extended based on user activity.
39
+ Each new request resets the timer to the specified timeout duration.
40
+ 'fixed' - The session timeout is fixed and based on the initial login time.
41
+ The session will expire after the specified duration, regardless of user activity.
42
+
43
+ Example:
44
+ expiryPolicy: 'rolling' or 'fixed'
45
+ */
46
+ expiryPolicy: 'fixed'
47
+ },
48
+ }
49
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/auth-base",
3
- "version": "6.2.84",
3
+ "version": "6.2.96",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -30,11 +30,11 @@
30
30
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
31
31
  },
32
32
  "dependencies": {
33
- "@things-factory/email-base": "^6.2.84",
34
- "@things-factory/env": "^6.2.33",
35
- "@things-factory/i18n-base": "^6.2.84",
36
- "@things-factory/shell": "^6.2.84",
37
- "@things-factory/utils": "^6.2.48",
33
+ "@things-factory/email-base": "^6.2.96",
34
+ "@things-factory/env": "^6.2.96",
35
+ "@things-factory/i18n-base": "^6.2.96",
36
+ "@things-factory/shell": "^6.2.96",
37
+ "@things-factory/utils": "^6.2.96",
38
38
  "jsonwebtoken": "^9.0.0",
39
39
  "koa-passport": "^6.0.0",
40
40
  "koa-session": "^6.4.0",
@@ -43,5 +43,5 @@
43
43
  "passport-local": "^1.0.0",
44
44
  "popsicle-cookie-jar": "^1.0.0"
45
45
  },
46
- "gitHead": "3c272e989acc14bbd02f4ec79624dfd7dc4e6acd"
46
+ "gitHead": "1b99f2ee4cd91db25748b376648b2905869e7a33"
47
47
  }