227cb313c4f2452a42500df46576d3ce26f5f122
[moon.git] /
1 module aaa-authn-model {
2   yang-version 1;
3   namespace "urn:aaa:yang:authn:claims";
4   prefix "authn";
5     organization "TBD";
6
7     contact "wdec@cisco.com";
8
9     revision 2014-10-29 {
10         description
11             "Initial revision.";
12     }
13
14 //Main module begins
15
16 // Following container provides the AuthN Claims data-structure
17
18   container tokencache {
19     config false;
20     list claims {
21       key "token";
22
23       leaf token {
24         type string;
25         description "Token";
26       }
27       leaf clientId {
28         type string;
29         description "id of the authorized client, or null if anonymous";
30       }
31       leaf userId {
32         type string;
33         description "Unique user-id. User IDs are system-created";
34       }
35       leaf user {
36         type string;
37         description "User name";
38       }
39       leaf domain {
40         type string;
41         description "Fully-qualified domain name";
42       }
43       leaf-list roles {
44         type string;
45         description "Assigned user roles";
46       }
47     }
48   }
49
50   container token_cache_times {
51
52     list token_list {
53       key userId;
54
55       leaf userId {
56         //TODO: Change to instance-ref
57         type string;
58       }
59
60     list user_tokens {
61       key tokenid;
62       leaf tokenid {
63         type leafref {path "/tokencache/claims/token";}
64       }
65       leaf timestamp {
66         type uint64;
67       }
68       leaf expiration {
69           type int64;
70           description "Expiration milliseconds since start of UTC epoch";
71       }
72       }
73     }
74   }
75
76   //authentication model is for generating objects to be stores in the
77   //data store for all the prev idm model objects.
78   container authentication{
79      list domain{
80          key domainid;
81          leaf domainid {
82              type string;
83          }
84          leaf name {
85              type string;
86          }
87          leaf description {
88              type string;
89          }
90          leaf enabled {
91              type boolean;
92          }
93      }
94
95      list user {
96          key userid;
97          leaf userid {
98              type string;
99          }
100          leaf name {
101              type string;
102          }
103          leaf description {
104              type string;
105          }
106          leaf enabled {
107              type boolean;
108          }
109          leaf email {
110              type string;
111          }
112          leaf password {
113              type string;
114          }
115          leaf salt {
116              type string;
117          }
118          leaf domainid {
119              type string;
120          }
121      }
122      list role {
123          key roleid;
124          leaf roleid {
125              type string;
126          }
127          leaf name {
128              type string;
129          }
130          leaf description {
131              type string;
132          }
133          leaf domainid {
134              type string;
135          }
136      }
137
138      list grant {
139          key grantid;
140          leaf grantid {
141              type string;
142          }
143          leaf domainid {
144              type string;
145          }
146          leaf userid {
147              type string;
148          }
149          leaf roleid {
150              type string;
151          }
152      }
153   }
154 }