doc.go 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package saml // import "yunion.io/x/onecloud/pkg/cloudid/saml"
  15. /*
  16. +-----------------+ +----------------+
  17. | CloudId Service | | Region Service |
  18. +-----------------+ +----------------+
  19. +----------+
  20. |EnableSaml|
  21. +-------------------+ +------------+ +----------+
  22. | Cloudaccount | |Cloudaccount|
  23. | (enabled|disable) | +------------+ +-----------+
  24. +----________-------+ |DisableSaml|
  25. _______/ \_______ +-----------+
  26. ___/ \____
  27. +--------------+ +--------------+
  28. | SamlProvider | | SamlProvider |
  29. | (available) | | (not match) |
  30. +--------------+ +--------------+
  31. Saml Check CronJob Task
  32. +-------+
  33. | Start |
  34. +---|---+
  35. |
  36. |
  37. v
  38. +------------------------+ Yes +----------------------------------------+ No +---------------------+
  39. | Is account enable saml | ----------------> | Is account has available saml provider |----------------> | Create saml provider|
  40. +------------------------+ +----------------------------------------+ +---------------------+
  41. | | |
  42. | No | Yes |
  43. | | |
  44. v | |
  45. +------+ | |
  46. | End | <-----------------------------------------------<----------------------------------------------------
  47. +------+
  48. Saml Auth Login
  49. +-------+
  50. | Start |
  51. +-------+
  52. |
  53. |
  54. v
  55. +-----------------------+ Yes +-----------------------------------------------+
  56. |Is account enable saml |-------------> |Prepare tmp Role and set expired time for user |
  57. +-----------------------+ +-----------------------------------------------+
  58. | No |
  59. | |
  60. | |
  61. | v
  62. | +------------------+
  63. | | Auth for console |
  64. | +------------------+
  65. | |
  66. | |
  67. v |
  68. +------+ |
  69. | End |<----------------------------------------------
  70. +------+
  71. */