Giter VIP home page Giter VIP logo

auth's People

Contributors

hasbai avatar jingyijun avatar kyln24 avatar pramsin avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ruslan-korneev

auth's Issues

支持 docker secrets

修改config.py,使 db_url、email_password、register_apikey_seed、kong_token 等配置项可以从 docker secrets 中读取。注意异常处理。

改进 identifier 的安全性

描述

user 的 identifier 字段用于登录时定位 user,通过 utils/auth.py 中的 many_hashes() 函数产生。这个函数应当加盐以提高其安全性。

期望结果

  • many_hashes() 应返回 hashlib.pbkdf2_hmac('sha3_512', byte_string, salt, iterations=1).hex()
  • salt 从 docker secrets 中读取,是一个 base64 字符串,解码为 bytes 后使用
  • 最好把 many_hashes() 换个名,比如 generate_identifier()
  • 迁移数据时 更新用户的 identifier

数据库 API 可参考 https://tortoise-orm.readthedocs.io/en/latest/getting_started.html#tutorial

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.