encrypt api keys written to clay

creates #66
This commit is contained in:
Anton Dyudin 2016-03-11 12:02:08 -08:00
parent 0d5c207758
commit dd5f670286
3 changed files with 12 additions and 1 deletions

View File

@ -1633,6 +1633,11 @@
+12.q
=+ ato=(sky [151 %noun] %cx (tope root-beak [%atom (flop %_(dom . sec+dom))]))
=+ key=?~(ato '' ;;(@t u.ato)) :: XX jael
=. key
?~ key ''
%- (bond |.(~&(bad-key+[dom key] '')))
=+ (slaw %uw key)
?~(- ~ (de:crua load-secret u)) :: XX clay permissions
`(bale)`[[our now (shas %bale eny) root-beak] [usr dom] key]
==
::

View File

@ -51,10 +51,16 @@
==
(poke--data [`%md pax] %mime / (taco txt))
::
++ ames-secret
^- @t
=- (crip +:<.^(@p %a pax)>)
pax=/(scot %p our)/code/(scot %da now)/(scot %p our)
::
++ poke-sec-atom
|= {hot/host dat/@}
?> ?=($& -.hot)
=. p.hot (scag 2 p.hot) :: ignore subdomain
=. dat (scot %uw (en:crua ames-secret dat)) :: XX clay permissions
(poke--data [`%atom [%sec p.hot]] %mime / (taco dat))
::
++ poke--data

View File

@ -1 +1 @@
cGhpbGlwY21vbmt0ZXN0OjEzMzdwYXNzd29yZA==
0wy-6.mDQa9.1XfY5.XF0tQ.28rEc.A6A40.T7YoZ.NdPMT.WifG3.82OJT.FrjnC.gLrsz.wO2sX.0Xi7h.Xv8cg.KFTTy.dFYMr.QMIsq.Y~ydB.zJIuK.NIGqU.ftlaD.-QpVd.zTWuY.XgeS~.qndM4