Managing Your API Access Policy
You can manage the API access policy of your OUTSCALE account to define a maximum possible lifetime that will apply to all your access keys. In that case, each of your access keys must imperatively have an expiration date, and none of their lifetimes up to the expiration date can exceed the value of the maximum possible lifetime.
Your API access policy also enables you to activate a trusted session that requires multi-factor authentication (MFA) in Cockpit and trusted access keys, and restricts the use of certain calls in the API.
|
An API access policy does not apply to an account using identity federation. |
|
The limit allowed for the maximum possible lifetime is 3153600000 seconds (100 years). |
Managing Your API Access Policy Using octl
Getting Information About Your API Access Policy
The ReadApiAccessPolicy command gets information about the API access policy of your OUTSCALE account.
For more information, see About Your API Access Policy.
$ octl iaas api ReadApiAccessPolicy --profile "default"
This command contains the following option that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action.
The ReadApiAccessPolicy command returns the following elements:
-
ApiAccessPolicy: Information about the API access policy.-
MaxAccessKeyExpirationSeconds: The maximum possible lifetime for your access keys, in seconds. If0, your access keys can have unlimited lifetimes. -
RequireTrustedEnv: If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see About Your API Access Policy. -
RequireTrustedEnvSecureMode: If true, a trusted session is activated. This will require you and all your EIM users to use only trusted access keys, to log in to Cockpit v2 using multi-factor authentication (MFA), and will restrict the CLI use of certain API calls. For more information, see About Your API Access Policy.
-
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": false,
"MaxAccessKeyExpirationSeconds": 0
}
}
Modifying Your API Access Policy
The UpdateApiAccessPolicy command updates the API access policy of your OUTSCALE account.
|
Only one API access policy can be associated with your account. For more information, see About Your API Access Policy. |
$ octl iaas api UpdateApiAccessPolicy --profile "default" \
--MaxAccessKeyExpirationSeconds 31536000 \
--RequireTrustedEnv=false \
--RequireTrustedEnvSecureMode=false
$ octl iaas api UpdateApiAccessPolicy --profile "default" \
--MaxAccessKeyExpirationSeconds 3153600000 \
--RequireTrustedEnv=true \
--RequireTrustedEnvSecureMode=false
$ octl iaas api UpdateApiAccessPolicy --profile "default" \
--MaxAccessKeyExpirationSeconds 0 \
--RequireTrustedEnv=false \
--RequireTrustedEnvSecureMode=false
This command contains the following options that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
MaxAccessKeyExpirationSeconds: The maximum possible lifetime for your access keys, in seconds (between0and3153600000, both included). If set to0, your access keys can have unlimited lifetimes, but a trusted session cannot be activated. Otherwise, all your access keys must have an expiration date. This value must be greater than the remaining lifetime of each access key of your account. -
RequireTrustedEnv: If true, a trusted session is activated, provided that you specify theMaxAccessKeyExpirationSecondsparameter with a value greater than0. This allows you to bypass Certificate Authorities (CAs) enforcement. -
RequireTrustedEnvSecureMode: If true, a trusted session is activated, provided that you specify theMaxAccessKeyExpirationSecondsparameter with a value greater than0and that the parameterRequireTrustedEnvis set totrue. This requires you and all your EIM users to use only trusted access keys, to log in to Cockpit v2 using multi-factor authentication (MFA), and will restrict the CLI use of certain API calls. For more information, see About Your API Access Policy > Scope of a Trusted Session.
The UpdateApiAccessPolicy command returns the following elements:
-
ApiAccessPolicy: Information about the API access policy.-
MaxAccessKeyExpirationSeconds: The maximum possible lifetime for your access keys, in seconds. If0, your access keys can have unlimited lifetimes. -
RequireTrustedEnv: If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see About Your API Access Policy. -
RequireTrustedEnvSecureMode: If true, a trusted session is activated. This will require you and all your EIM users to use only trusted access keys, to log in to Cockpit v2 using multi-factor authentication (MFA), and will restrict the CLI use of certain API calls. For more information, see About Your API Access Policy.
-
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": false,
"MaxAccessKeyExpirationSeconds": 31536000
}
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": true,
"MaxAccessKeyExpirationSeconds": 3153600000
}
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": false,
"MaxAccessKeyExpirationSeconds": 0
}
}
Managing Your API Access Policy Using OSC CLI
Getting Information About Your API Access Policy
The ReadApiAccessPolicy command gets information about the API access policy of your OUTSCALE account.
For more information, see About Your API Access Policy.
$ osc-cli api ReadApiAccessPolicy --profile "default"
$ osc-cli api ReadApiAccessPolicy --profile "default" --authentication-method "password" --login "$OSC_LOGIN" --password "$OSC_PASSWORD"
This command contains the following option that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action.
The ReadApiAccessPolicy command returns the following elements:
-
ApiAccessPolicy: Information about the API access policy.-
MaxAccessKeyExpirationSeconds: The maximum possible lifetime for your access keys, in seconds. If0, your access keys can have unlimited lifetimes. -
RequireTrustedEnv: If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see About Your API Access Policy. -
RequireTrustedEnvSecureMode: If true, a trusted session is activated. This will require you and all your EIM users to use only trusted access keys, to log in to Cockpit v2 using multi-factor authentication (MFA), and will restrict the CLI use of certain API calls. For more information, see About Your API Access Policy.
-
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": false,
"MaxAccessKeyExpirationSeconds": 0
}
}
Modifying Your API Access Policy
The UpdateApiAccessPolicy command updates the API access policy of your OUTSCALE account.
|
Only one API access policy can be associated with your account. For more information, see About Your API Access Policy. |
$ osc-cli api UpdateApiAccessPolicy --profile "default" \
--MaxAccessKeyExpirationSeconds 31536000 \
--RequireTrustedEnv False \
--RequireTrustedEnvSecureMode False
$ osc-cli api UpdateApiAccessPolicy --profile "default" \
--MaxAccessKeyExpirationSeconds 3153600000 \
--RequireTrustedEnv True \
--RequireTrustedEnvSecureMode False
$ osc-cli api UpdateApiAccessPolicy --profile "default" \
--MaxAccessKeyExpirationSeconds 0 \
--RequireTrustedEnv False \
--RequireTrustedEnvSecureMode False
$ osc-cli api UpdateApiAccessPolicy --profile "default" --authentication-method "password" --login "$OSC_LOGIN" --password "$OSC_PASSWORD" \
--MaxAccessKeyExpirationSeconds 0 \
--RequireTrustedEnv False \
--RequireTrustedEnvSecureMode False
This command contains the following options that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
MaxAccessKeyExpirationSeconds: The maximum possible lifetime for your access keys, in seconds (between0and3153600000, both included). If set to0, your access keys can have unlimited lifetimes, but a trusted session cannot be activated. Otherwise, all your access keys must have an expiration date. This value must be greater than the remaining lifetime of each access key of your account. -
RequireTrustedEnv: If true, a trusted session is activated, provided that you specify theMaxAccessKeyExpirationSecondsparameter with a value greater than0. This allows you to bypass Certificate Authorities (CAs) enforcement. -
RequireTrustedEnvSecureMode: If true, a trusted session is activated, provided that you specify theMaxAccessKeyExpirationSecondsparameter with a value greater than0and that the parameterRequireTrustedEnvis set totrue. This requires you and all your EIM users to use only trusted access keys, to log in to Cockpit v2 using multi-factor authentication (MFA), and will restrict the CLI use of certain API calls. For more information, see About Your API Access Policy > Scope of a Trusted Session.
The UpdateApiAccessPolicy command returns the following elements:
-
ApiAccessPolicy: Information about the API access policy.-
MaxAccessKeyExpirationSeconds: The maximum possible lifetime for your access keys, in seconds. If0, your access keys can have unlimited lifetimes. -
RequireTrustedEnv: If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see About Your API Access Policy. -
RequireTrustedEnvSecureMode: If true, a trusted session is activated. This will require you and all your EIM users to use only trusted access keys, to log in to Cockpit v2 using multi-factor authentication (MFA), and will restrict the CLI use of certain API calls. For more information, see About Your API Access Policy.
-
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": false,
"MaxAccessKeyExpirationSeconds": 31536000
}
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": true,
"MaxAccessKeyExpirationSeconds": 3153600000
}
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": false,
"MaxAccessKeyExpirationSeconds": 0
}
}
Managing Your API Access Policy Using oapi-cli
Getting Information About Your API Access Policy
The ReadApiAccessPolicy command gets information about the API access policy of your OUTSCALE account.
For more information, see About Your API Access Policy.
$ oapi-cli --profile "default" ReadApiAccessPolicy
$ oapi-cli --profile "default" --login "$OSC_LOGIN" --password "$OSC_PASSWORD" ReadApiAccessPolicy
This command contains the following option that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action.
The ReadApiAccessPolicy command returns the following elements:
-
ApiAccessPolicy: Information about the API access policy.-
MaxAccessKeyExpirationSeconds: The maximum possible lifetime for your access keys, in seconds. If0, your access keys can have unlimited lifetimes. -
RequireTrustedEnv: If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see About Your API Access Policy. -
RequireTrustedEnvSecureMode: If true, a trusted session is activated. This will require you and all your EIM users to use only trusted access keys, to log in to Cockpit v2 using multi-factor authentication (MFA), and will restrict the CLI use of certain API calls. For more information, see About Your API Access Policy.
-
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": false,
"MaxAccessKeyExpirationSeconds": 0
}
}
Modifying Your API Access Policy
The UpdateApiAccessPolicy command updates the API access policy of your OUTSCALE account.
|
Only one API access policy can be associated with your account. For more information, see About Your API Access Policy. |
$ oapi-cli --profile "default" UpdateApiAccessPolicy \
--MaxAccessKeyExpirationSeconds 31536000 \
--RequireTrustedEnv false \
--RequireTrustedEnvSecureMode false
$ oapi-cli --profile "default" UpdateApiAccessPolicy \
--MaxAccessKeyExpirationSeconds 3153600000 \
--RequireTrustedEnv true \
--RequireTrustedEnvSecureMode false
$ oapi-cli --profile "default" UpdateApiAccessPolicy \
--MaxAccessKeyExpirationSeconds 0 \
--RequireTrustedEnv false \
--RequireTrustedEnvSecureMode false
$ oapi-cli --profile "default" --login "$OSC_LOGIN" --password "$OSC_PASSWORD" UpdateApiAccessPolicy \
--MaxAccessKeyExpirationSeconds 0 \
--RequireTrustedEnv false \
--RequireTrustedEnvSecureMode false
This command contains the following options that you need to specify:
-
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
MaxAccessKeyExpirationSeconds: The maximum possible lifetime for your access keys, in seconds (between0and3153600000, both included). If set to0, your access keys can have unlimited lifetimes, but a trusted session cannot be activated. Otherwise, all your access keys must have an expiration date. This value must be greater than the remaining lifetime of each access key of your account. -
RequireTrustedEnv: If true, a trusted session is activated, provided that you specify theMaxAccessKeyExpirationSecondsparameter with a value greater than0. This allows you to bypass Certificate Authorities (CAs) enforcement. -
RequireTrustedEnvSecureMode: If true, a trusted session is activated, provided that you specify theMaxAccessKeyExpirationSecondsparameter with a value greater than0and that the parameterRequireTrustedEnvis set totrue. This requires you and all your EIM users to use only trusted access keys, to log in to Cockpit v2 using multi-factor authentication (MFA), and will restrict the CLI use of certain API calls. For more information, see About Your API Access Policy > Scope of a Trusted Session.
The UpdateApiAccessPolicy command returns the following elements:
-
ApiAccessPolicy: Information about the API access policy.-
MaxAccessKeyExpirationSeconds: The maximum possible lifetime for your access keys, in seconds. If0, your access keys can have unlimited lifetimes. -
RequireTrustedEnv: If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see About Your API Access Policy. -
RequireTrustedEnvSecureMode: If true, a trusted session is activated. This will require you and all your EIM users to use only trusted access keys, to log in to Cockpit v2 using multi-factor authentication (MFA), and will restrict the CLI use of certain API calls. For more information, see About Your API Access Policy.
-
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": false,
"MaxAccessKeyExpirationSeconds": 31536000
}
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": true,
"MaxAccessKeyExpirationSeconds": 3153600000
}
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ApiAccessPolicy": {
"RequireTrustedEnv": false,
"MaxAccessKeyExpirationSeconds": 0
}
}
Related Page
Corresponding API Methods