Skip to content

sftp

SFTPSubmodel

Bases: BaseSettingsModel

Specific settings for SFTP sites.

Use sftp_pass OR sftp_key (and sftp_key_pass) to authenticate. sftp_key is public ssh part, expected .pem OpenSSH format, must be accessible on shared drive for all artists, use sftp_pass if no shared drive present on artist's machines.

Source code in server/settings/providers/sftp.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
class SFTPSubmodel(BaseSettingsModel):
    """Specific settings for SFTP sites.

    Use sftp_pass OR sftp_key (and sftp_key_pass) to authenticate.
    sftp_key is public ssh part, expected .pem OpenSSH format, must be
    accessible on shared drive for all artists, use sftp_pass if no shared
    drive present on artist's machines.
    """
    _layout = "expanded"
    sftp_host: str = Field(
        "",
        title="SFTP host name",
        scope=["studio", "project"],
        description="Domain name or IP of sftp server",
    )

    sftp_port: int = Field(
        0,
        title="SFTP port",
        scope=["studio", "project"],
    )

    sftp_user: str = Field(
        "",
        title="SFTP user name",
        scope=["studio", "project", "site"],
    )

    sftp_pass: str = Field(
        "",
        title="SFTP password",
        scope=["studio", "project", "site"],
        description="Use password or ssh key to authenticate",
    )

    sftp_key: CredPathPerPlatform = Field(
        title="SFTP key path",
        scope=["studio", "project", "site"],
        default_factory=CredPathPerPlatform,
        description="Pah to certificate file",
    )

    sftp_key_pass: str = Field(
        "",
        title="SFTP user ssh key password",
        scope=["studio", "project", "site"],
        description="Password for ssh key",
    )

    roots: str = Field(
        "",
        title="SFTP root folder",
        scope=["studio", "project"],
        description="Root folder on SFTP",
    )