You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: boot_levels.go
    path of file: ./repos/corteza/server/app
    
    the code of the file until where you have to start completion: package app

import (
	"context"
	"crypto/tls"
	"fmt"
	"github.com/cortezaproject/corteza/server/pkg/sass"
	"net/url"
	"os"
	"regexp"
	"strings"
	"time"

	authService "github.com/cortezaproject/corteza/server/auth"
	"github.com/cortezaproject/corteza/server/auth/saml"
	authSettings "github.com/cortezaproject/corteza/server/auth/settings"
	autService "github.com/cortezaproject/corteza/server/automation/service"
	cmpService "github.com/cortezaproject/corteza/server/compose/service"
	cmpEvent "github.com/cortezaproject/corteza/server/compose/service/event"
	discoveryService "github.com/cortezaproject/corteza/server/discovery/service"
	fedService "github.com/cortezaproject/corteza/server/federation/service"
	"github.com/cortezaproject/corteza/server/pkg/actionlog"
	"github.com/cortezaproject/corteza/server/pkg/apigw"
	apigwTypes "github.com/cortezaproject/corteza/server/pkg/apigw/types"
	"github.com/cortezaproject/corteza/server/pkg/auth"
	"github.com/cortezaproject/
    
func (app *CortezaApp) Provision(ctx context.Context) (err error) {
	if app.lvl >= bootLevelProvisioned {
		return
	}

	if err = app.InitStore(ctx); err != nil {
		return
	}

	if err = app.initSystemEntities(ctx); err != nil {
		return fmt.Errorf("could not initialize system entities: %w", err)
	}

	{
		// register temporary RBAC with bypass roles
		// this is needed because envoy relies on availability of access-control
		//
		// @todo envoy should be decoupled from RBAC and import directly into store,
		//       w/o using any access control

		var (
			ac  = rbac.NewService(zap.NewNop(), app.Store)
			acr = make([]*rbac.Role, 0)
		)
		for _, r := range auth.ProvisionUser().Roles() {
			acr = append(acr, rbac.BypassRole.Make(r, auth.BypassRoleHandle))
		}
		ac.UpdateRoles(acr...)
		rbac.SetGlobal(ac)
		defer rbac.SetGlobal(nil)
	}

	if !app.Opt.Provision.Always {
		app.Log.Debug("provisioning skipped (PROVISION_ALWAYS=false)")
	} else {
		defer sentry.Recover()

		ctx = actionlog.RequestOriginToContext(ctx, actionlog.RequestOrigin_APP_Provision)
		ctx = auth.SetIdentityToContext(ctx, auth.ProvisionUser())

		if err = provision.Run(ctx, app.Log, app.Store, app.Opt.Provision, app.Opt.Auth); err != nil {
			return fmt.Errorf("could not run provision: %w", err)
		}
	}

	app.lvl = bootLevelProvisioned
	return
}