1. Packages
  2. Artifactory Provider
  3. API Docs
  4. GeneralSecurity
artifactory v8.8.1 published on Wednesday, Apr 9, 2025 by Pulumi

artifactory.GeneralSecurity

Explore with Pulumi AI

This resource can be used to manage Artifactory’s general security settings.

Only a single artifactory.GeneralSecurity resource is meant to be defined.

~>The artifactory.GeneralSecurity resource utilizes endpoints which are blocked/removed in SaaS environments (i.e. in Artifactory online), rendering this resource incompatible with Artifactory SaaS environments.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";

// Configure Artifactory general security settings
const security = new artifactory.GeneralSecurity("security", {enableAnonymousAccess: true});
Copy
import pulumi
import pulumi_artifactory as artifactory

# Configure Artifactory general security settings
security = artifactory.GeneralSecurity("security", enable_anonymous_access=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-artifactory/sdk/v8/go/artifactory"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Configure Artifactory general security settings
		_, err := artifactory.NewGeneralSecurity(ctx, "security", &artifactory.GeneralSecurityArgs{
			EnableAnonymousAccess: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;

return await Deployment.RunAsync(() => 
{
    // Configure Artifactory general security settings
    var security = new Artifactory.GeneralSecurity("security", new()
    {
        EnableAnonymousAccess = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.GeneralSecurity;
import com.pulumi.artifactory.GeneralSecurityArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        // Configure Artifactory general security settings
        var security = new GeneralSecurity("security", GeneralSecurityArgs.builder()
            .enableAnonymousAccess(true)
            .build());

    }
}
Copy
resources:
  # Configure Artifactory general security settings
  security:
    type: artifactory:GeneralSecurity
    properties:
      enableAnonymousAccess: true
Copy

Create GeneralSecurity Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new GeneralSecurity(name: string, args?: GeneralSecurityArgs, opts?: CustomResourceOptions);
@overload
def GeneralSecurity(resource_name: str,
                    args: Optional[GeneralSecurityArgs] = None,
                    opts: Optional[ResourceOptions] = None)

@overload
def GeneralSecurity(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    enable_anonymous_access: Optional[bool] = None,
                    encryption_policy: Optional[str] = None)
func NewGeneralSecurity(ctx *Context, name string, args *GeneralSecurityArgs, opts ...ResourceOption) (*GeneralSecurity, error)
public GeneralSecurity(string name, GeneralSecurityArgs? args = null, CustomResourceOptions? opts = null)
public GeneralSecurity(String name, GeneralSecurityArgs args)
public GeneralSecurity(String name, GeneralSecurityArgs args, CustomResourceOptions options)
type: artifactory:GeneralSecurity
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args GeneralSecurityArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args GeneralSecurityArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args GeneralSecurityArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args GeneralSecurityArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GeneralSecurityArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var generalSecurityResource = new Artifactory.GeneralSecurity("generalSecurityResource", new()
{
    EnableAnonymousAccess = false,
    EncryptionPolicy = "string",
});
Copy
example, err := artifactory.NewGeneralSecurity(ctx, "generalSecurityResource", &artifactory.GeneralSecurityArgs{
	EnableAnonymousAccess: pulumi.Bool(false),
	EncryptionPolicy:      pulumi.String("string"),
})
Copy
var generalSecurityResource = new GeneralSecurity("generalSecurityResource", GeneralSecurityArgs.builder()
    .enableAnonymousAccess(false)
    .encryptionPolicy("string")
    .build());
Copy
general_security_resource = artifactory.GeneralSecurity("generalSecurityResource",
    enable_anonymous_access=False,
    encryption_policy="string")
Copy
const generalSecurityResource = new artifactory.GeneralSecurity("generalSecurityResource", {
    enableAnonymousAccess: false,
    encryptionPolicy: "string",
});
Copy
type: artifactory:GeneralSecurity
properties:
    enableAnonymousAccess: false
    encryptionPolicy: string
Copy

GeneralSecurity Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The GeneralSecurity resource accepts the following input properties:

EnableAnonymousAccess bool
Enable anonymous access. Default value is false.
EncryptionPolicy string
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
EnableAnonymousAccess bool
Enable anonymous access. Default value is false.
EncryptionPolicy string
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
enableAnonymousAccess Boolean
Enable anonymous access. Default value is false.
encryptionPolicy String
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
enableAnonymousAccess boolean
Enable anonymous access. Default value is false.
encryptionPolicy string
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
enable_anonymous_access bool
Enable anonymous access. Default value is false.
encryption_policy str
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
enableAnonymousAccess Boolean
Enable anonymous access. Default value is false.
encryptionPolicy String
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.

Outputs

All input properties are implicitly available as output properties. Additionally, the GeneralSecurity resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing GeneralSecurity Resource

Get an existing GeneralSecurity resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GeneralSecurityState, opts?: CustomResourceOptions): GeneralSecurity
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enable_anonymous_access: Optional[bool] = None,
        encryption_policy: Optional[str] = None) -> GeneralSecurity
func GetGeneralSecurity(ctx *Context, name string, id IDInput, state *GeneralSecurityState, opts ...ResourceOption) (*GeneralSecurity, error)
public static GeneralSecurity Get(string name, Input<string> id, GeneralSecurityState? state, CustomResourceOptions? opts = null)
public static GeneralSecurity get(String name, Output<String> id, GeneralSecurityState state, CustomResourceOptions options)
resources:  _:    type: artifactory:GeneralSecurity    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
EnableAnonymousAccess bool
Enable anonymous access. Default value is false.
EncryptionPolicy string
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
EnableAnonymousAccess bool
Enable anonymous access. Default value is false.
EncryptionPolicy string
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
enableAnonymousAccess Boolean
Enable anonymous access. Default value is false.
encryptionPolicy String
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
enableAnonymousAccess boolean
Enable anonymous access. Default value is false.
encryptionPolicy string
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
enable_anonymous_access bool
Enable anonymous access. Default value is false.
encryption_policy str
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.
enableAnonymousAccess Boolean
Enable anonymous access. Default value is false.
encryptionPolicy String
Determines the password requirements from users identified to Artifactory from a remote client such as Maven. The options are: (1) SUPPORTED (default): Users can authenticate using secure encrypted passwords or clear-text passwords. (2) REQUIRED: Users must authenticate using secure encrypted passwords. Clear-text authentication fails. (3) UNSUPPORTED: Only clear-text passwords can be used for authentication. Default value is SUPPORTED.

Import

Current general security settings can be imported using security as the ID, e.g.

$ pulumi import artifactory:index/generalSecurity:GeneralSecurity security security
Copy

~>The artifactory_general_security resource uses endpoints that are undocumented and may not work with SaaS environments, or may change without notice.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
artifactory pulumi/pulumi-artifactory
License
Apache-2.0
Notes
This Pulumi package is based on the artifactory Terraform Provider.