CREATE YOUR POLICY

There are 4 ways to create a new policy with _spartan:

  • run _spartan init in the project root directory and step through the interview questions (See the Questions page for the list of questions)
    • You can also run _spartan init L to get the long-form interview questions
  • run _spartan init y or _spartan init Y in the project root directory to build a new policy with default values
  • run _spartan -D or _spartan --default in the project root directory to build a new policy with default values
  • run _spartan --no-overwrite in the project root directory to build a new policy without overwriting an existing policy

No matter which process you use, you SHOULD end up with a policy file called security.json (or, if you’ve used the ‘no-overwrite option, a policy file called ‘security-XXXXXXXXX.json, where ‘X…X’ is the last eight digits of the new policy)

Once complete, you should see a screen that looks something like this:

Let’s break down the key components:

  1. Points out the location of your policy file. It should be at the top of your project
  2. Provides success message for completed boilerplate for a specific policy id
    • Note that any modules that were not written during boilerplate generation are also listed (e.g. ‘skipping api management…’)
  3. Take note of the ‘Next Steps’ section => it tells you exactly what you need to install, additional configurations you need to do (outside of the application)
  4. Finally, you get a hash of both the policy and boilerplate files. Think of it like a receipt. See the ‘integrity’ page in the get started section for more details