Home - Trainees-travelling-Open-Source-Sea/cert-issuer GitHub Wiki

BLOCKCERTS - The Authentication System of Certificate of University

์šฐ๋ฆฌ๋Š” ๋Œ€ํ•™ ์‹œ์Šคํ…œ์„ ํ†ตํ•ด ์ด๋ฃจ์–ด์ง€๋Š” ํ•™์œ„ ์ธ์ฆ์ด ๋Š์ž„์—†๋Š” ํ•™์œ„ ์œ„์กฐ ๋ฌธ์ œ๋ฅผ ๋‚ณ๋Š”๋‹ค๋Š” ์ ์— ์ฃผ๋ชฉํ•˜์—ฌ ์ด ํ”„๋กœ์ ํŠธ๋ฅผ ์‹œ์ž‘ํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๊ทธ์— ๋Œ€ํ•œ ๋Œ€๋น„์ฑ…์œผ๋กœ ๋‚˜์˜จ๊ฒƒ์ด ๋ธ”๋ก ์ฒด์ธ ์ธ์ฆ์„œ์ด๋‹ค.

์šฐ๋ฆฌ์˜ ํ”„๋กœ์ ํŠธ๋Š” MIT's Media Lab๊ณผ Learning Machine์ด ๊ณต๋™์œผ๋กœ ๊ฐœ๋ฐœํ•˜๊ณ  ์žˆ๋Š” 'Blockcerts'์— ๋Œ€ํ•œ ์˜คํ”ˆ์†Œ์Šค ์ค‘ cert-issuer1 ์— ๋Œ€ํ•œ ํ”„๋กœ์ ํŠธ์ด๋‹ค

p2
์ฐธ๊ณ  : https://www.blockcerts.org/

https://medium.com/mit-media-lab/what-we-learned-from-designing-an-academic-certificates-system-on-the-blockchain-34ba5874f196

cert-issuer

cert-issuer๋Š” ๋ฐœ๊ธ‰๊ธฐ๊ด€์—์„œ ์ธ์ฆ์„œ ์ž์ฒด์˜ ํ•ด์‹œ๊ฐ€ ํฌํ•จ๋œ ํŠธ๋žœ์žญ์…˜์„ ๋งŒ๋“ค์–ด ๋ธ”๋ก ์ฒด์ธ ์ธ์ฆ์„œ๋ฅผ ๋ฐœ๊ธ‰ํ•˜๋Š” ํ”„๋กœ์ ํŠธ์ด๋‹ค.


์ฝ”๋“œ ์‹คํ–‰ ํ๋ฆ„

  • cert-issuer -c /etc/cert-issuer/conf.ini ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜๋ฉด, cert_issuer/main.py์˜ cert_issuer_main()์ด ์‹คํ–‰๋œ๋‹ค. (config.py์— ์ •์˜๋˜์–ด ์žˆ์Œ)

  • Cert_issuer_main()์˜ ๋‚ด์šฉ

    • main.py:
      • Cert_issuer_main():
        = Config.get_config() : ์„ค์ •์„ ๋ถˆ๋Ÿฌ์˜จ๋‹ค
        = Issuer_certificates.main(config) : ์‹คํ–‰
  • Issue_certificates.main(config)์˜ ๋‚ด์šฉ

    • Issue_certificates.py:
      • main(app_config) : ๋ธ”๋ก์ฒด์ธ ์„ค์ • ํ›„ issue()์‹คํ–‰ ๋ฐ tx_id ๋ฐ˜ํ™˜
        = Issue() : ํŠธ๋žœ์žญ์…˜ ๋ฐœํ–‰ํ•˜๊ณ  tx_id(ํŠธ๋žœ์žญ์…˜ ์•„์ด๋””) ๋ฐ˜ํ™˜
        = Pre_batch_actions(config)
        = Ensure_balance()
        = Issuer ํด๋ž˜์Šค ์ƒ์„ฑ
        = Issuer.issue()์‹คํ–‰ : issuer.py์˜ issue() ํ•จ์ˆ˜๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ์‹ค์ œ๋กœ issueํ•˜๋Š” ์—ญํ• ์ด๋‹ค. ์ด ๊ณผ์ •์—์„œ Merkle tree์˜ ์ƒ์„ฑ๋„ ๊ฐ™์ด ํ•œ๋‹ค.
        = Post_batch_actions(config)

Docker2๋ฅผ ์ด์šฉํ•œ ๊ฐ„๋‹จํ•œ ํ•™์œ„ ์ธ์ฆ ๊ณผ์ •

์•„๋ž˜ ๋งํฌ๋ฅผ ํ†ตํ•ด์„œ Docker๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋‹ค. Docker ์„ค์น˜

Docker๋Š” ์ปจํ…Œ์ด๋„ˆ ๊ธฐ๋ฐ˜์˜ ๊ฐ€์ƒํ™” ๋„๊ตฌ์ด๋‹ค. ์ด๊ฒƒ์„ ์ด์šฉํ•ด์„œ ํ•™์œ„ ์ธ์ฆ ๊ณผ์ •์„ ์•Œ์•„๋ณผ ์ˆ˜ ์žˆ๋‹ค.

  1. Docker๋ฅผ ์ด์šฉํ•ด์„œ ๊ฐ€์ƒ์˜ ๋น„ํŠธ์ฝ”์ธ ์„œ๋ฒ„์— ์—ฐ๊ฒฐํ•œ๋‹ค.
  2. ๋น„ํŠธ์ฝ”์ธ ์„œ๋ฒ„์—์„œ ์ธ์ฆ์„œ๋ฅผ ๋ฐ›๊ธฐ์œ„ํ•ด ํ•„์š”ํ•œ ๋น„ํŠธ์ฝ”์ธ์„ ๋ฐ›๋Š”๋‹ค.
  3. ํ•™๊ต ๊ณ ์œ ์˜ ๊ณต์šฉํ‚ค๋ฅผ ๋ฐ›๋Š”๋‹ค.
  4. ํ•™๊ต์— ๋น„ํŠธ์ฝ”์ธ์„ ์ง€๋ถˆํ•˜์—ฌ ์ธ์ฆ์„œ๋ฅผ ๋ฐ›๋Š”๋‹ค.

์ธ์ฆ์„œ๋ฅผ ๋ฐœ๊ธ‰ํ•˜๋Š” ๊ณผ์ •์€ ์•„๋ž˜์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ์ธ์ฆ์„œ ๋ฐœ๊ธ‰ ๊ณผ์ • ์•Œ์•„๋ณด๊ธฐ

์ธ์ฆ์„œ์˜ ์ง„์œ„ ์—ฌ๋ถ€๋ฅผ ์•Œ ์ˆ˜ ์žˆ๋Š” ํ™ˆํŽ˜์ด์ง€๊ฐ€ ์žˆ๋‹ค. ์ธ์ฆ์„œ ์ง„์œ„์—ฌ๋ถ€ ํ™•์ธ


ํ˜„์žฌ(2018.12.03 ๊ธฐ์ค€) ์„ธ์ข…๋Œ€ํ•™๊ต ํ•™์œ„ ์ธ์ฆ ๋ฐ ์ธ์ฆ์„œ ๋ฐœ๊ธ‰ ์‹œ์Šคํ…œ

ํ•™์ƒ: ์ž๋™ ๋ฐœ๊ธ‰๊ธฐ๋ฅผ ํ†ตํ•ด ์ฆ๋ช…์„œ๋ฅผ ์‹ ์ฒญ

โ†“

ํ•™๊ต: ํ•™์œ„ ์ธ์ฆ์„œ ๋ฐœ๊ธ‰์— ํ•„์š”ํ•œ ์ •๋ณด๋“ค์„ ํ•™๊ต DB Server์—์„œ ๊ฐ€์ ธ์™€ ์ด๋ฅผ ์ฆ๋ช…์„œ ๋ฐœ๊ธ‰์— ๋งž์ถฐ ๊ฐ€๊ณต์„ ํ•˜์—ฌ ์ด๋ฏธ์ง€ ํŒŒ์ผ๋กœ ๋ฐœ๊ธ‰

ํ•™๊ต ๋‚ด ์ค‘์•™ ์ง‘์ค‘ํ™”๋œ ์„œ๋ฒ„(*DB server)์—์„œ ํ•™์ƒ์˜ ๋ฐœ๊ธ‰ ์š”์ฒญ์— ๋”ฐ๋ผ ์ธ์ฆ ๋ฐ ๋ฐœ๊ธ‰ ์ ˆ์ฐจ ์ง„ํ–‰


์ธ์ฆ์„œ์—์„œ ์‚ฌ์šฉ์ž์˜ ์ •๋ณด๋ฅผ ๋‹ด๊ณ  ์žˆ๋Š” .jsonํŒŒ์ผ

1. jsonํŒŒ์ผ ๋ถ„์„ํ•˜๊ธฐ

  • ๋ฐœ๊ธ‰๋œ ์ธ์ฆ์„œ๋Š” jsonํŒŒ์ผ๋กœ ์ €์žฅ์ด ๋œ๋‹ค. ์ด ํŒŒ์ผ์•ˆ์— ์žˆ๋Š” ๋‚ด์šฉ์„ ๋ถ„์„ํ•ด๋ณด์ž. json file ๋ถ„์„

2. ์ธ์ฆ์„œ ์•ˆ์˜ ๋‚ด์šฉ ๋ณ€๊ฒฝํ•˜๊ธฐ

3. ๋ณ€๊ฒฝ๋œ ์ธ์ฆ์„œ์˜ ์ง„์œ„ ์—ฌ๋ถ€ ํ™•์ธํ•˜๊ธฐ


1: BLOCKCERTS ๊ณ„์ •์˜ cert-issuer repository์— ์ธ์ฆ์— ํ•„์š”ํ•œ cert-viewer repository๋ฅผ ํฌํ•จ์‹œํ‚จ ๊ตฌ์กฐ๋ฅผ ์ทจํ•˜์˜€์Šต๋‹ˆ๋‹ค.

2: application์„ ์‹ ์†ํ•˜๊ฒŒ ๊ตฌ์ถ•, ํ…Œ์ŠคํŠธ ๋ฐ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ๋Š” software platform์ž…๋‹ˆ๋‹ค. Docker๋Š” ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ์ปจํ…Œ์ด๋„ˆ(container)๋ผ๋Š” ํ‘œ์ค€ํ™”๋œ unit์œผ๋กœ ํŒจํ‚ค์ง•(packaging)ํ•˜๋ฉฐ, ์ด ์ปจํ…Œ์ด๋„ˆ์—๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ, ์‹œ์Šคํ…œ ๋„๊ตฌ, ์ฝ”๋“œ, ๋Ÿฐํƒ€์ž„ ๋“ฑ ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ๋ชจ๋“  ๊ฒƒ์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. Docker๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํ™˜๊ฒฝ์— ๊ตฌ์• ๋ฐ›์ง€ ์•Š๊ณ  ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹ ์†ํ•˜๊ฒŒ ๋ฐฐํฌ ๋ฐ ํ™•์žฅ(์ด๋ฅผ ํ†ตํ•œ ๋งˆ์ดํฌ๋กœ ์„œ๋น„์Šค ๊ตฌํ˜„์ด ๊ฐ€๋Šฅํ•˜๋‹ค)ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ์ฝ”๋“œ๊ฐ€ ๋ฌธ์ œ์—†์ด ์‹คํ–‰๋  ๊ฒƒ์ž„์„ ํ™•์‹ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ฐธ๊ณ : https://aws.amazon.com/ko/docker/

https://www.youtube.com/watch?v=gQG_FX9hlMg

โš ๏ธ **GitHub.com Fallback** โš ๏ธ