Raptor Package Manager - Security Configuration Commands
Jan 1 2022 at 12:00 AM
- Overview
- Add security configuration profile
- Edit security configuration profile
- Delete security configuration profile
Overview
The following section describes how to configure the raptor package manager cli tool device store security profiles. There can be more than one device store security profile per device store. Security profiles can also be seen as authentication configuration of the device store.
Please see below overview on available commands and subcommands associated to the security configurations.
Execute
raptorpm devicestore security -h
Output
security:
Commands related to security configuration on the device store profiles
Usage:
raptorpm devicestore security [options] [command]
Options:
Verbose, -v Option to specify if command should be logged in detail
-?, -h, --help Show help and usage information
Commands:
add <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName> <Basic|Digest|None|Password> Command related to adding a new device store security configuration
edit <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName> <Basic|Digest|None|Password> Command related to editing a preconfigured device store security configuration profile
delete <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName> Command related to deleting a preconfigured device store security configuration profile.
The following commands will be discussed:
add
- Adds a security/authentication configuration profile.edit
- Alter a predefined or preconfigured security/authentication configuration profile.delete
- Delete a preconfigured security configuration profile.
To preview the security configrations, either use the list command for device store, or use the list command for publish profile.
Add security configuration profile
To add or create a security configuration profile, we have the following command available.
Execute
raptorpm devicestore security add -h
Output
add:
Command related to adding a new device store security configuration
Usage:
raptorpm devicestore security add [options] <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName> <AuthenticationType>
Arguments:
<ProfileName> Specify Profile Name
<DeviceStoreName> Specify the device store name Also known as the device store identifier.
<DeviceStoreSecurityName> Specify device store security profile name.
<Basic|Digest|None|Password> Option to specify a authentication type.
Options:
DeviceStoreSecurityDescription, -secDescription <DeviceStoreSecurityDescription> Specify device store security description [default: ]
DeviceStoreSecurityIsActive, -secIsActive Option to specify a name to greet. true or false [default: True]
UserName, -secUser <secUser> Option to specify a username.
Password, -secPassword <secPassword> Option to specify a password.
PasswordInClearText, -secClear Option to specify if we save the password in clear text.
ApiKeyLegend, -secApiKeyLegend <secApiKeyLegend> Option to specify the api key legend or header key value.
ApiKeyValue, -secApiKey <ApiKeyValue> Option to specify the api key value in clear text.
Force, -f Option to force add the configuration ignoring existing profiles and overwriting them. [default: False]
Verbose, -v Option to specify if command should be logged in detail
-?, -h, --help Show help and usage information
Note that we can only add a security configuration profile to an existing device store profile. We will need the publish profile name and the device store name as the above usage indicates.
Additional arguments required are the device store security profile name, and then the authentication type when adding a new security configuration profile.
Usage
raptorpm devicestore security add [options] <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName> <AuthenticationType>
1. Add security profile with no authentication
The following sample demostrates how to add a security configuration profile with no security.
Usage
raptorpm devicestore security add [options] <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName> <AuthenticationType>
Sample Execute
raptorpm devicestore security add "ProfileA" "Development.Store" "Development.NoSecurity" None
Sample Output
Successfully added device store security: Development.NoSecurity to device store Development.Store and publish profile ProfileA
Per default if no security profile is added to the device store profile, it will use a no security profile and no authentication.
2. Add security profile with basic authentication, including api-key
The following sample demostrates how to add a security configuration profile applying the basic authentication implementation.
Usage
raptorpm devicestore security add [options] <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName> <AuthenticationType> -secUser <secUser> -secPassword <secPassword> -secApiKeyLegend <secApiKeyLegend>-secApiKey <ApiKeyValue>
Sample Execute
raptorpm devicestore security add "ProfileA" "Development.Store" "Development.Basic.Security" "Basic" -secUser "Administrator" -secPassword "LnqEJ5KH2J7Qafn8" -secApiKeyLegend "X-NuGet-ApiKey" -secApiKey "NuGet-Api-Key-Value"
Sample Output
Successfully added device store security: Development.Basic.Security to device store Development.Store and publish profile ProfileA
3. Add security profile with digest authentication, including api-key
The following sample demostrates how to add a security configuration profile applying the digest authentication implementation.
Usage
raptorpm devicestore security add [options] <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName> <AuthenticationType> -secUser <secUser> -secPassword <secPassword> -secApiKeyLegend <secApiKeyLegend>-secApiKey <ApiKeyValue>
Sample Execute
raptorpm devicestore security add "ProfileA" "Development.Store" "Development.Digest.Security" "Digest" -secUser "Administrator" -secPassword "AvCZfFNgVyB9sB39" -secApiKeyLegend "X-NuGet-ApiKey" -secApiKey "NuGet-Api-Key-Value"
Sample Output
Successfully added device store security: Development.Digest.Security to device store Development.Store and publish profile ProfileA
Edit security configuration profile
To edit or update a existing security configuration profile , we can run execute the following command to list the available edit options. Note that the security profile name value cannot be altered.
Execute
raptorpm devicestore security edit -h
Output
edit:
Command related to editing a preconfigured device store security configuration profile
Usage:
raptorpm devicestore security edit [options] <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName> <AuthenticationType>
Arguments:
<ProfileName> Specify Profile Name
<DeviceStoreName> Specify the device store name Also known as the device store identifier.
<DeviceStoreSecurityName> Specify device store security profile name.
<Basic|Digest|None|Password> Option to specify a authentication type.
Options:
DeviceStoreSecurityDescription, -secDescription Specify device store security description [default: ]
<DeviceStoreSecurityDescription>
DeviceStoreSecurityIsActive, -secIsActive Option to specify a name to greet. true or false [default: True]
UserName, -secUser <secUser> Option to specify a username.
Password, -secPassword <secPassword> Option to specify a password.
PasswordInClearText, -secClear Option to specify if we save the password in clear text.
ApiKeyLegend, -secApiKeyLegend <secApiKeyLegend> Option to specify the api key legend or header key value.
ApiKeyValue, -secApiKey <ApiKeyValue> Option to specify the api key value in clear text.
Force, -f Option to force add the configuration ignoring existing profiles and
overwriting them. [default: False]
Verbose, -v Option to specify if command should be logged in detail
-?, -h, --help Show help and usage information
Note that we always have to specify the profile name, device store name and security profile name when trying to update a security configuration profile. Additionally, we are not able to update the device store security profile name.
Sample Execute
raptorpm devicestore security edit "ProfileA" "Development.Store" "Development.Digest.Security" "Digest" -secPassword "HkSEkY83gA2wNz6s"
Sample Output
Successfully updated device store security configuration : Development.Digest.Security to device store Development.Store and publish profile ProfileA
Delete security configuration profile
Command related to deleting a preconfigured device store security configuration profile.
Usage
raptorpm devicestore security delete -h
Output
delete:
Command related to deleting a preconfigured device store security configuration profile.
Usage:
raptorpm devicestore security delete [options] <ProfileName> <DeviceStoreName> <DeviceStoreSecurityName>
Arguments:
<ProfileName> Specify Profile Name
<DeviceStoreName> Specify the device store name Also known as the device store identifier.
<DeviceStoreSecurityName> Specify device store security profile name.
Options:
Verbose, -v Option to specify if command should be logged in detail
-?, -h, --help Show help and usage information
Sample Execute
raptorpm devicestore security delete "ProfileA" "Development.Store" "Development.Digest.Security"
Sample Output
Successfully deleted device store security configuration: Development.Digest.Security