Lua-resty-auto-ssl: sudo luarocksλŠ” μ—¬μ „νžˆ νƒˆμˆ˜λœ 0.5.0을 μ‚¬μš©ν•˜μ—¬ lua-resty-auto-ssl을 μ„€μΉ˜ν•©λ‹ˆλ‹€.

에 λ§Œλ“  2019λ…„ 09μ›” 25일  Β·  10μ½”λ©˜νŠΈ  Β·  좜처: auto-ssl/lua-resty-auto-ssl

방금 μ•„λž˜ luarocks λͺ…령을 μ‚¬μš©ν•˜μ—¬ lua-resty-auto-ssl을 μ„€μΉ˜ν•˜λ €κ³  ν–ˆμŠ΅λ‹ˆλ‹€.
sudo luarocks install lua-resty-auto-ssl

κ·ΈλŸ¬λ‚˜ μœ νš¨μ„± 검사 쀑에 letsencryptμ—μ„œ Replay-Nonce 헀더λ₯Ό κ°€μ Έμ˜€λŠ” 버그가 μžˆλŠ” νƒˆμˆ˜λœ 버전 0.5.0을 계속 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. μž‘λ™ν•˜λ €λ©΄ νƒˆμˆ˜λœ νŒŒμΌμ„ μ—…λ°μ΄νŠΈν•΄μ•Ό ν•©λ‹ˆλ‹€!

luarocks μ €μž₯μ†Œλ₯Ό μ—…λ°μ΄νŠΈν•  수 μžˆμŠ΅λ‹ˆκΉŒ?

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

μ§€μ—°μœΌλ‘œ 인해 λΆˆνŽΈμ„ λ“œλ € μ£„μ†‘ν•©λ‹ˆλ‹€. μ—¬λŸ¬λΆ„! μ΅œμ‹  λ²„μ „μ˜ νƒˆμˆ˜λœ λ²ˆλ“€μ„ ν¬ν•¨ν•˜λŠ” v0.13.0이 이제 λ¦΄λ¦¬μŠ€λ˜μ—ˆμŠ΅λ‹ˆλ‹€. μƒˆ λ¦΄λ¦¬μŠ€μ—μ„œ μ—¬μ „νžˆ λ¬Έμ œκ°€ ν‘œμ‹œλ˜λ©΄ μ†Œλ¦¬λ₯Ό 지λ₯΄μ‹­μ‹œμ˜€.

그리고 이 λ¬Έμ œμ™€ μž„μ‹œ ν•΄κ²° 방법을 보고해 μ£Όμ‹  λͺ¨λ“  λΆ„λ“€κ»˜ κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€!

λͺ¨λ“  10 λŒ“κΈ€

letsencrypt 포럼의 κ²Œμ‹œλ¬Ό 에 λ”°λ₯΄λ©΄ letsencryptλŠ” μ–΄μ œ CDN을 λ³€κ²½ν•˜μ—¬ νƒˆμˆ˜λœ 0.5.0 버전에 문제λ₯Ό μΌμœΌμΌ°μŠ΅λ‹ˆλ‹€.
κ³„νšλœ 0.13.0 λ¦΄λ¦¬μŠ€μ—λŠ” 이 문제λ₯Ό ν•΄κ²°ν•œλ‹€κ³  μ•Œλ €μ§„ 0.6.5κ°€ ν¬ν•¨λœ κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€.

@im-erikjohansson κ°μ‚¬ν•©λ‹ˆλ‹€.

μœ μ‚¬ν•œ λ¬Έμ œμ— μ§λ©΄ν•œ μ‚¬λžŒμ€ ' /usr/local/openresty/luajit/bin/resty-auto-ssl/dehydrated'에 μžˆλŠ” 'νƒˆμˆ˜λœ' νŒŒμΌμ„ μ—…λ°μ΄νŠΈν•΄μ•Ό ν•©λ‹ˆλ‹€.

λ‹€μŒ 쀄을 μ—…λ°μ΄νŠΈν•©λ‹ˆλ‹€.
REAL_LICENSE="$(http_request head "${CA_TERMS}" | (grep Location: || true) | awk -F ': ' '{print $2}' | tr -d '\n\r')"
μ—κ²Œ
REAL_LICENSE="$(http_request head "${CA_TERMS}" | (grep -i Location: || true) | awk -F ': ' '{print $2}' | tr -d '\n\r')"

그리고

# Retrieve nonce from acme-server if [[ ${API} -eq 1 ]]; then nonce="$(http_request head "${CA}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')" else nonce="$(http_request head "${CA_NEW_NONCE}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')" fi

μ—κ²Œ

# Retrieve nonce from acme-server if [[ ${API} -eq 1 ]]; then nonce="$(http_request head "${CA}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')" else nonce="$(http_request head "${CA_NEW_NONCE}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')" fi

@ronaldgetz μ™„λ²½ν•œ μž„μ‹œ μˆ˜μ •μ— κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€.
0.13.0 λ¦΄λ¦¬μŠ€κ°€ μ–Έμ œ μ˜ˆμ •λ˜μ–΄ μžˆλŠ”μ§€ μ•„μ‹­λ‹ˆκΉŒ?

0.13.0 λ¦΄λ¦¬μŠ€λŠ” κ°€λŠ₯ν•œ ν•œ 빨리 λ¦΄λ¦¬μŠ€λ˜μ–΄μ•Ό ν•©λ‹ˆλ‹€. 이 문제λ₯Ό 돕기 μœ„ν•΄ μ œκ°€ ν•  수 μžˆλŠ” 일이 μžˆμŠ΅λ‹ˆκΉŒ?

@GUI 당신은 이것에 μ°¨μž„ ν•  수 μžˆμŠ΅λ‹ˆκΉŒ? 이것은 HTTP/2 λŒ€μ†Œλ¬Έμžλ₯Ό κ΅¬λΆ„ν•˜λŠ” ν—€λ”λ‘œ 인해 λ°œμƒν•œ 것 κ°™μŠ΅λ‹ˆλ‹€.
νƒˆμˆ˜ κ°€ ν•΄κ²°λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

이것은 μš°μ„  μˆœμœ„κ°€ λ†’μ•„μ•Ό ν•©λ‹ˆλ‹€. μ˜€ν”ˆ μ†ŒμŠ€ ν”„λ‘œμ νŠΈλ₯Ό μœ μ§€ κ΄€λ¦¬ν•˜λŠ” 것이 μ–Όλ§ˆλ‚˜ λ§Žμ€ μž‘μ—…μΈμ§€ μ•ŒκΈ° λ•Œλ¬Έμ— μš”κ΅¬ν•˜κ±°λ‚˜ 아무것도 ν•˜κ³  싢지 μ•ŠμŠ΅λ‹ˆλ‹€. ν•˜μ§€λ§Œ 더 이상 μƒˆλ‘œμš΄ SSL μΈμ¦μ„œλ₯Ό λ°œκΈ‰ν•  수 μ—†μœΌλ―€λ‘œ 이 λ²„μ „μ˜ μƒˆ 버전을 μΆœμ‹œν•˜μ‹­μ‹œμ˜€.

λˆ„κ΅°κ°€ 우리처럼 Docker Containersμ—μ„œ 이것을 μ‹€ν–‰ν•˜λŠ” 경우 - μš°λ¦¬λŠ” λ‹€μŒκ³Ό 같은 μˆ˜μ • 사항을 λ°°ν¬ν–ˆμŠ΅λ‹ˆλ‹€.

# Temporary fix for https://github.com/GUI/lua-resty-auto-ssl/issues/192
RUN sed -i 's/grep Location/grep -i Location/g' /usr/local/openresty/luajit/bin/resty-auto-ssl/dehydrated && \
    sed -i 's/grep Replay/grep -i Replay/g' /usr/local/openresty/luajit/bin/resty-auto-ssl/dehydrated

μˆ˜μ •μ— λŒ€ν•΄ @ronaldgetz μ—κ²Œ κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€.

μΏ¨, 이것도 λ‚΄ μͺ½μ—μ„œ κ³ μ³€μ–΄

Details:
{
  "type": "urn:acme:error:badNonce",
  "detail": "JWS has no anti-replay nonce",
  "status": 400
}

μ§€μ—°μœΌλ‘œ 인해 λΆˆνŽΈμ„ λ“œλ € μ£„μ†‘ν•©λ‹ˆλ‹€. μ—¬λŸ¬λΆ„! μ΅œμ‹  λ²„μ „μ˜ νƒˆμˆ˜λœ λ²ˆλ“€μ„ ν¬ν•¨ν•˜λŠ” v0.13.0이 이제 λ¦΄λ¦¬μŠ€λ˜μ—ˆμŠ΅λ‹ˆλ‹€. μƒˆ λ¦΄λ¦¬μŠ€μ—μ„œ μ—¬μ „νžˆ λ¬Έμ œκ°€ ν‘œμ‹œλ˜λ©΄ μ†Œλ¦¬λ₯Ό 지λ₯΄μ‹­μ‹œμ˜€.

그리고 이 λ¬Έμ œμ™€ μž„μ‹œ ν•΄κ²° 방법을 보고해 μ£Όμ‹  λͺ¨λ“  λΆ„λ“€κ»˜ κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€!

@GUI μƒˆλ‘œμš΄ μˆ˜μ • λ²„μ „μ˜ λΉ λ₯Έ μΆœμ‹œμ— κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€. ν™•μ‹€νžˆ 일반적인 μœ μ§€ κ΄€λ¦¬μžκ°€ κ·Έλ ‡κ²Œ 빨리 λ°˜μ‘ν•˜λŠ” 것은 μ•„λ‹™λ‹ˆλ‹€. 당신은 μ—¬κΈ°μ—μ„œ ν›Œλ₯­ν•œ 일을 ν–ˆμŠ΅λ‹ˆλ‹€. πŸ‘λ‹€μ‹œν•œλ²ˆ κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€.

λ‹€μŒμ€ 더 μ‰¬μš΄ ν•«ν”½μŠ€λ₯Ό μœ„ν•œ 패치둜 @ronaldgetz λ³€κ²½ μ‚¬ν•­μž…λ‹ˆλ‹€.

--- luajit/bin/resty-auto-ssl/dehydrated    2019-10-23 16:05:48.322378013 +0200
+++ luajit/bin/resty-auto-ssl/dehydrated    2019-10-23 16:08:12.359383225 +0200
@@ -296,7 +296,7 @@
   else
     # Check if private account key exists, if it doesn't exist yet generate a new one (rsa key)
     if [[ ! -e "${ACCOUNT_KEY}" ]]; then
-      REAL_LICENSE="$(http_request head "${CA_TERMS}" | (grep Location: || true) | awk -F ': ' '{print $2}' | tr -d '\n\r')"
+      REAL_LICENSE="$(http_request head "${CA_TERMS}" | (grep -i Location: || true) | awk -F ': ' '{print $2}' | tr -d '\n\r')"
       if [[ -z "${REAL_LICENSE}" ]]; then
         printf '\n' >&2
         printf 'Error retrieving terms of service from certificate authority.\n' >&2
@@ -523,9 +523,9 @@

   # Retrieve nonce from acme-server
   if [[ ${API} -eq 1 ]]; then
-    nonce="$(http_request head "${CA}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
+    nonce="$(http_request head "${CA}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
   else
-    nonce="$(http_request head "${CA_NEW_NONCE}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
+    nonce="$(http_request head "${CA_NEW_NONCE}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
   fi

   # Build header with just our public key and algorithm information
이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰