ima

module
v0.0.0-...-3266887 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more

README

IAM - 身份识别与访问管理系统

IAM = Identity and Access Management

IAM 是一个基于 Go 语言开发的身份识别与访问管理系统,用于对资源访问进行授权。最新稳定版本为:v1.6.2,建议基于稳定版安装测试

这里需要注意:

  • 如果你是极客时间《Go 语言项目开发实战》专栏的读者,请使用 v1.1.0 版本(tag)
  • 如果你是图书《从零构建企业级 Go 项目》的读者,请使用 v1.6.2 版本(tag)

更详细的版本映射请参考:版本映射

IAM 同时也具有以下能力:

  1. 配合极客时间专栏 Go 语言项目开发实战,讲解如何用 Go 做企业级应用的开发,是该项目的理论课程,包含了项目各个知识点和构建思路的讲解,也会包含我的一线研发经验和建议。

  2. 作为一个开发脚手架,供开发者克隆后二次开发,快速构建自己的应用。

IAM 项目会长期维护、定期更新,欢迎兄弟们 Star & Contribute

功能特性

本项目用到了Go企业开发的大部分核心技能点,见下图:

技术思维导图

更多请参考:marmotedu/gocollect

软件架构

IAM架构

架构解析见:IAM 架构 & 能力说明

快速开始

依赖检查
  1. 服务器能访问外网

  2. 操作系统:CentOS Linux 8.x (64-bit)

本安装脚本基于 CentOS 8.2 安装,建议你选择 CentOS 8.x 系统。其它Linux发行版、macOS也能安装,不过需要手动安装。

快速部署

快速部署请参考:IAM 部署指南

IAM 项目还提供了更详细的部署文档,请参考:手把手教你部署IAM系统

构建

如果你需要重新编译IAM项目,可以执行以下 2 步:

  1. 克隆源码
$ git clone https://github.com/marmotedu/iam $GOPATH/src/github.com/marmotedu/iam
  1. 编译
$ cd $GOPATH/src/github.com/marmotedu/iam
$ make

构建后的二进制文件保存在 _output/platforms/linux/amd64/ 目录下。

使用指南

IAM Documentation

如何贡献

欢迎贡献代码,贡献流程可以参考 developer's documentation

社区

You are encouraged to communicate most things via GitHub issues or pull requests.

关于作者

为了方便交流,我建了微信群,可以加我 微信:nightskong,拉你入群,方便交流。

谁在用

如果你有项目在使用iam系统模板,也欢迎联系作者,加入使用案例。

许可证

IAM is licensed under the MIT. See LICENSE for the full license text.

Directories

Path Synopsis
api
swagger/docs
Package docs IAM API Server API.
Package docs IAM API Server API.
cmd
iam-apiserver
apiserver is the api server for iam-apiserver service.
apiserver is the api server for iam-apiserver service.
iam-authz-server
authzserver is the server for iam-authz-server.
authzserver is the server for iam-authz-server.
iam-pump
pump is iam analytics purger that moves the data generated by your iam-authz-server nodes to any back-end.
pump is iam analytics purger that moves the data generated by your iam-authz-server nodes to any back-end.
iam-watcher
pump is iam analytics purger that moves the data generated by your iam-authz-server nodes to any back-end.
pump is iam analytics purger that moves the data generated by your iam-authz-server nodes to any back-end.
iamctl
iamctl is the command line tool for iam platform.
iamctl is the command line tool for iam platform.
examples
internal
apiserver
Package apiserver does all the work necessary to create a iam APIServer.
Package apiserver does all the work necessary to create a iam APIServer.
apiserver/config
Package config defines configuration for iam-apiserver.
Package config defines configuration for iam-apiserver.
apiserver/controller/v1/cache
Package cache defines a cache service which can return all secrets and policies.
Package cache defines a cache service which can return all secrets and policies.
apiserver/controller/v1/policy
Package policy implements the policy handlers.
Package policy implements the policy handlers.
apiserver/controller/v1/secret
Package secret implements the secret handlers.
Package secret implements the secret handlers.
apiserver/controller/v1/user
Package user implements the user handler.
Package user implements the user handler.
apiserver/options
Package options contains flags and options for initializing an apiserver
Package options contains flags and options for initializing an apiserver
apiserver/service/v1
Package v1 is the place where you can implements more complex business logic.
Package v1 is the place where you can implements more complex business logic.
apiserver/store
Package store defines the storage interface for iam-apiserver.
Package store defines the storage interface for iam-apiserver.
apiserver/store/etcd
Package etcd implements `github.com/marmotedu/iam/internal/apiserver/store.Store` interface.
Package etcd implements `github.com/marmotedu/iam/internal/apiserver/store.Store` interface.
apiserver/store/fake
Package fake implements `github.com/marmotedu/iam/internal/apiserver/store.Store` interface.
Package fake implements `github.com/marmotedu/iam/internal/apiserver/store.Store` interface.
apiserver/store/mysql
Package mysql implements `github.com/marmotedu/iam/internal/apiserver/store.Store` interface.
Package mysql implements `github.com/marmotedu/iam/internal/apiserver/store.Store` interface.
authzserver
Package authzserver does all of the work necessary to create a authzserver
Package authzserver does all of the work necessary to create a authzserver
authzserver/analytics
Package analytics defines functions and structs used to store authorization audit data to redis.
Package analytics defines functions and structs used to store authorization audit data to redis.
authzserver/authorization
Package authorization implement the authorize interface that use local repository to authorize the subject access review.
Package authorization implement the authorize interface that use local repository to authorize the subject access review.
authzserver/authorization/authorizer
Package authorizer defines authorization interface.
Package authorizer defines authorization interface.
authzserver/config
Package config defines iam-authz-server configuration.
Package config defines iam-authz-server configuration.
authzserver/controller/v1/authorize
Package authorize implements the authorize handlers.
Package authorize implements the authorize handlers.
authzserver/load
Package load loads pump plugins.
Package load loads pump plugins.
authzserver/options
Package options contains flags and options for initializing an apiserver
Package options contains flags and options for initializing an apiserver
authzserver/store
Package store defines the storage interface for authzserver.
Package store defines the storage interface for authzserver.
iamctl
Package iamctl provides the functions used by the iamctl command line tool under github.com/marmotedu/iam/cmd.
Package iamctl provides the functions used by the iamctl command line tool under github.com/marmotedu/iam/cmd.
iamctl/cmd
Package cmd create a root cobra command and add subcommands to it.
Package cmd create a root cobra command and add subcommands to it.
iamctl/cmd/color
Package color print colors supported by the current terminal.
Package color print colors supported by the current terminal.
iamctl/cmd/completion
Package completion output shell completion code for the specified shell (bash or zsh).
Package completion output shell completion code for the specified shell (bash or zsh).
iamctl/cmd/info
Package info print the host information.
Package info print the host information.
iamctl/cmd/jwt
Package jwt can be used to sign/show/verify jwt token with given secretID and secretKey.
Package jwt can be used to sign/show/verify jwt token with given secretID and secretKey.
iamctl/cmd/new
Package new used to generate demo command code.
Package new used to generate demo command code.
iamctl/cmd/options
Package options print a list of global command-line options (applies to all commands).
Package options print a list of global command-line options (applies to all commands).
iamctl/cmd/policy
Package policy provides functions to manage authorization policies on iam platform.
Package policy provides functions to manage authorization policies on iam platform.
iamctl/cmd/secret
Package secret provides functions to manage secrets on iam platform.
Package secret provides functions to manage secrets on iam platform.
iamctl/cmd/set
Package set used to set specific features on objects.
Package set used to set specific features on objects.
iamctl/cmd/user
Package user provides functions to manage users on iam platform.
Package user provides functions to manage users on iam platform.
iamctl/cmd/validate
Package validate validate the basic environment for iamctl to run.
Package validate validate the basic environment for iamctl to run.
iamctl/cmd/version
Package version print the client and server version information.
Package version print the client and server version information.
iamctl/util/interrupt
Package interrupt deal with signals.
Package interrupt deal with signals.
iamctl/util/templates
Package templates provides template functions for working with templates.
Package templates provides template functions for working with templates.
iamctl/util/term
Package term provides structures and helper functions to work with terminal (state, sizes).
Package term provides structures and helper functions to work with terminal (state, sizes).
pkg/code
Package code defines error codes for iam platform.
Package code defines error codes for iam platform.
pkg/logger
Package logger defines gorm logger
Package logger defines gorm logger
pkg/middleware
Package middleware defines multiple gin middlewares
Package middleware defines multiple gin middlewares
pkg/middleware/auth
Package auth defines authentication strategy like Basic, Bearer.
Package auth defines authentication strategy like Basic, Bearer.
pkg/options
Package options is the public flags and options used by a generic api server.
Package options is the public flags and options used by a generic api server.
pkg/server
Package server defines the generic apiserver used by all iam platform.
Package server defines the generic apiserver used by all iam platform.
pkg/util/gormutil
Package gormutil is a util to convert offset and limit to default values.
Package gormutil is a util to convert offset and limit to default values.
pkg/validation
Package validation defines validate functions internal used by iam.
Package validation defines validate functions internal used by iam.
pump
Package pump does all the work necessary to create an iam pump server.
Package pump does all the work necessary to create an iam pump server.
pump/analytics
Package analytics defines all the functions and structs used to store traffic analytics.
Package analytics defines all the functions and structs used to store traffic analytics.
pump/config
Package config defines pump configuration.
Package config defines pump configuration.
pump/options
Package options contains flags and options for initializing an apiserver
Package options contains flags and options for initializing an apiserver
pump/pumps
Package pumps defines multiple back-end service used to persistent store iam analytics data.
Package pumps defines multiple back-end service used to persistent store iam analytics data.
pump/storage
Package storage defines storages which store the analytics data from iam-authz-server.
Package storage defines storages which store the analytics data from iam-authz-server.
pump/storage/redis
Package redis provides an redis implementation of the AnalyticsStorage storage interface.
Package redis provides an redis implementation of the AnalyticsStorage storage interface.
watcher
Package watcher does all the work necessary to create a iam watcher server.
Package watcher does all the work necessary to create a iam watcher server.
watcher/config
Package config defines pump configuration.
Package config defines pump configuration.
watcher/options
Package options contains flags and options for initializing an apiserver
Package options contains flags and options for initializing an apiserver
pkg
app
Package app defines an application framework used to create application.
Package app defines an application framework used to create application.
cli/genericclioptions
Package genericclioptions contains flags which can be added to you command, bound, completed, and produce useful helper functions.
Package genericclioptions contains flags which can be added to you command, bound, completed, and produce useful helper functions.
db
Package db provide useful functions to create mysql instance.
Package db provide useful functions to create mysql instance.
log
shutdown
Package shutdown Providing shutdown callbacks for graceful app shutdown Installation To install run: go get github.com/marmotedu/iam/pkg/shutdown Example - posix signals Graceful shutdown will listen for posix SIGINT and SIGTERM signals.
Package shutdown Providing shutdown callbacks for graceful app shutdown Installation To install run: go get github.com/marmotedu/iam/pkg/shutdown Example - posix signals Graceful shutdown will listen for posix SIGINT and SIGTERM signals.
shutdown/shutdownmanagers/posixsignal
Package posixsignal provides a listener for a posix signal.
Package posixsignal provides a listener for a posix signal.
storage
Package storage defines redis storage.
Package storage defines redis storage.
validator
Package validator defines iam custom binding validators used by gin.
Package validator defines iam custom binding validators used by gin.
third_party
forked/murmur3
Package murmur3 implements Austin Appleby's non-cryptographic MurmurHash3.
Package murmur3 implements Austin Appleby's non-cryptographic MurmurHash3.
tools
codegen Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL