Skip to content

Commit

Permalink
adding "enroll assets" as a command line action
Browse files Browse the repository at this point in the history
  • Loading branch information
ndenny committed Apr 8, 2025
1 parent fb69867 commit 07efe9b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bin/bastion.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ def run(self):
("export vaults declared",
"list vaults declared", self.do_export_vaults_declared),

("refresh keytab", self.do_refresh_keytab)
("refresh keytab", self.do_refresh_keytab),
("enroll assets", self.do_enroll_assets)
]

#-- Look for an explicitly declared session ID in opts;
Expand Down Expand Up @@ -801,6 +802,14 @@ def do_refresh_keytab(self, request):
else:
return request.failed(result, report = "keytab regeneration failed")

def do_enroll_assets(self, request):
"""
Given a site and zone, I scan the folders in the zone and create a new configuration file based on the contents of the zone.
On successful completion, I create (or overwrite) a configuration file that is the asset catalog for the given zone.
By default, the asset catalog is written to ~/.bastion/conf-{site}-{zone}-catalog.yaml, unless otherwise specified by the arg:
"catalog.path"
"""
raise NotImplementedError


if __name__ == '__main__':
Expand Down

0 comments on commit 07efe9b

Please sign in to comment.