Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE: FTP #425

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,394 changes: 1,363 additions & 31 deletions DSCResources/Helper.psm1

Large diffs are not rendered by default.

1,700 changes: 1,700 additions & 0 deletions DSCResources/MSFT_FTP/MSFT_FTP.psm1

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions DSCResources/MSFT_FTP/MSFT_FTP.schema.mof
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[ClassVersion("2.0.0"), FriendlyName("FTP")]
class MSFT_FTP : OMI_BaseResource
{
[Write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure;
[Key, Description("Specifies the name of the FTP site.")] String Name;
[Write, Description("Specifies physical location of the FTP site.")] String PhysicalPath;
[Write, Description("Specifies the username for physical path access of the FTP site.")] String PhysicalPathAccessAccount;
[Write, Description("Specifies the password for physical path access of the FTP site.")] String PhysicalPathAccessPass;
[Write,ValueMap{"Started","Stopped"},Values{"Started", "Stopped"}] String State;
[Write, Description("Specifies the name of the application pool to be used.")] String ApplicationPool;
[Write, EmbeddedInstance("MSFT_FTPAuthenticationInformation"), Description("Hashtable containing authentication information (Anonymous, Basic)")] String AuthenticationInfo;
[Write, EmbeddedInstance("MSFT_FTPAuthorizationInformation"), Description("Hashtable containing authentication information (AccessType, Roles, Permissions, Users)")] String AuthorizationInfo[];
[Write, EmbeddedInstance("MSFT_FTPBindingInformation"), Description("Website's binding information in the form of an array of embedded instances of the MSFT_FTPBindingInformation CIM class.")] String BindingInfo[];
[Write, EmbeddedInstance("MSFT_FTPSslInformation"), Description("Hashtable containing Ssl information (ControlChannelPolicy, DataChannelPolicy, RequireSsl128, CertificateThumbprint, CertificateStoreName)")] String SslInfo;
[Write, Description ("The external firewall IP address used for passive connections")] String FirewallIPAddress;
[Write, Description ("The starting port number in port range used for data connections in passive mode")] UInt16 StartingDataChannelPort;
[Write, Description ("The ending port number in port range used for data connections in passive mode")] UInt16 EndingDataChannelPort;
[Write, Description ("The message the FTP server displays when FTP clients have logged in to the FTP server")] String GreetingMessage;
[Write, Description ("The message the FTP server displays when FTP clients log off the FTP server")] String ExitMessage;
[Write, Description ("The message the FTP server displays when FTP clients first connect to the FTP server")] String BannerMessage;
[Write, Description ("The message when clients cannot connect because the FTP service has reached the maximum number of client connections allowed")] String MaxClientsMessage;
[Write, Description ("Whether to display the default identification banner for the FTP server")] Boolean SuppressDefaultBanner;
[Write, Description ("Whether to display detailed error messages on the local host")] Boolean AllowLocalDetailedErrors;
[Write, Description ("Whether to display a specific set of user variables in FTP messages")] Boolean ExpandVariablesInMessages;
[Write, Description ("The directory to be used for logfiles")] String LogPath;
[Write, Description ("The W3C logging fields"), ValueMap{"Date","Time","ClientIP","UserName","ServerIP","Method","UriStem","UriQuery","HttpStatus","Win32Status","TimeTaken","ServerPort","UserAgent","Referer","HttpSubStatus"},Values{"Date","Time","ClientIP","UserName","ServerIP","Method","UriStem","UriQuery","HttpStatus","Win32Status","TimeTaken","ServerPort","UserAgent","Referer","HttpSubStatus"}] String LogFlags[];
[Write, Description ("How often the log file should rollover"), ValueMap{"Hourly","Daily","Weekly","Monthly","MaxSize"},Values{"Hourly","Daily","Weekly","Monthly","MaxSize"}] String LogPeriod;
[Write, Description ("How large the file should be before it is truncated")] String LogTruncateSize;
[Write, Description ("Use the localtime for file naming and rollover")] Boolean LoglocalTimeRollover;
[Write, Description ("What method of Directory Browsing should be enabled"), ValueMap{"StyleUnix","LongDate","DisplayAvailableBytes","DisplayVirtualDirectories"},Values{"StyleUnix","LongDate","DisplayAvailableBytes","DisplayVirtualDirectories"}] String DirectoryBrowseFlags[];
[Write, Description ("What method of UserIsolation should be enabled"), ValueMap{"None","StartInUsersDirectory","IsolateAllDirectories","IsolateRootDirectoryOnly"},Values{"None","StartInUsersDirectory","IsolateAllDirectories","IsolateRootDirectoryOnly"}] String UserIsolation;
};

[ClassVersion("1.0.0")]
class MSFT_FTPSslInformation
{
[Write,ValueMap{"SslAllow", "SslRequire", "SslRequireCredentialsOnly"},Values{"SslAllow", "SslRequire", "SslRequireCredentialsOnly"}] String ControlChannelPolicy;
[Write,ValueMap{"SslAllow", "SslRequire", "SslDeny"},Values{"SslAllow", "SslRequire", "SslDeny"}] String DataChannelPolicy;
[Write] Boolean RequireSsl128;
[Write] String CertificateThumbprint;
[Write,ValueMap{"My", "WebHosting"},Values{"My", "WebHosting"}] String CertificateStoreName;
};

[ClassVersion("1.0.0")]
class MSFT_FTPBindingInformation
{
[Required,ValueMap{"ftp"},Values{"ftp"}] String Protocol;
[Write] String BindingInformation;
[Write] String IPAddress;
[Write] UInt16 Port;
[Write] String HostName;
};

[ClassVersion("1.0.0")]
class MSFT_FTPAuthorizationInformation
{
[Write,ValueMap{"Allow", "Deny"},Values{"Allow", "Deny"}] String AccessType;
[Write] String Roles;
[Write,ValueMap{"Read", "Write", "Read,Write" },Values{"Read", "Write", "Read,Write"}] String Permissions;
[Write] String Users;
};

[ClassVersion("1.0.0")]
class MSFT_FTPAuthenticationInformation
{
[Write] Boolean Anonymous;
[Write] Boolean Basic;
};
69 changes: 69 additions & 0 deletions DSCResources/MSFT_FTP/en-us/MSFT_FTP.strings.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
ConvertFrom-StringData @'
ErrorftpSiteDiscoveryFailure = Failure to get the requested ftpSite "{0}" information from the target machine.
ErrorftpSiteCreationFailure = Failure to successfully create the ftpSite "{0}". Error: "{1}".
ErrorftpSiteRemovalFailure = Failure to successfully remove the ftpSite "{0}". Error: "{1}".
ErrorftpSiteStateFailure = Failure to successfully set the state of the website "{0}". Error: "{1}".
ErrorServerCertHashFailure = No such cert with the hash of "{0}" exists under store "{1}".
VerboseGetTargetAbsent = No ftpSite exists with this name.
VerboseGetTargetPresent = A single ftpSite exists with this name.
VerboseSetTargetftpSiteCreated = Successfully created ftpSite "{0}".
VerboseSetTargetftpSiteRemoved = Successfully removed ftpSite "{0}".
VerboseSetTargetAuthenticationInfoUpdated = Successfully updated AuthenticationInfo on ftpSite "{0}".
VerboseSetTargetAuthorizationInfoUpdated = Successfully updated AuthorizationInfo on ftpSite "{0}".
VerboseSetTargetUpdateAllowLocalDetailedErrors = Successfully updated AllowLocalDetailedErrors on ftpSite "{0}".
VerboseSetTargetUpdateBannerMessage = Successfully updated Banner message on ftpSite "{0}".
VerboseSetTargetUpdatedApplicationPool = Successfully updated ApplicationPool on ftpSite "{0}".
VerboseSetTargetUpdatedBindingInfo = Successfully updated BindingInfo on ftpSite "{0}".
VerboseSetTargetUpdateDirectoryBrowseFlags = Successfully updated DirectoryBrowseFlags on ftpSite "{0}".
VerboseSetTargetUpdateEndingDataChannelPort = Successfully updated ending data channel port on ftpSite "{0}".
VerboseSetTargetUpdateExitMessage = Successfully updated Exit message on ftpSite "{0}".
VerboseSetTargetUpdateExpandVariablesInMessages = Successfully updated ExpandVariablesInMessages on ftpSite "{0}".
VerboseSetTargetUpdateExternalIPaddress = Successfully updated external firewall IP address on ftpSite "{0}".
VerboseSetTargetUpdateGreetingMessage = Successfully updated Greeting message on ftpSite "{0}".
VerboseSetTargetUpdateLogFlags = Successfully updated LogFlags on ftpSite "{0}".
VerboseSetTargetUpdateLoglocalTimeRollover = Successfully updated LoglocalTimeRollover on ftpSite "{0}".
VerboseSetTargetUpdateLogPath = Successfully updated LogPath on ftpSite "{0}".
VerboseSetTargetUpdateLogPeriod = Successfully updated LogPeriod on ftpSite "{0}".
VerboseSetTargetUpdateLogTruncateSize = Successfully updated TruncateSize on ftpSite "{0}".
VerboseSetTargetUpdateMaxClientsMessage = Successfully updated MaxClients message on ftpSite "{0}".
VerboseSetTargetUpdatedPhysicalPath = Successfully updated PhysicalPath on ftpSite "{0}".
VerboseSetTargetUpdatePhysicalPathAccessPass = Successfully updated password for physical path access on ftpSite "{0}".
VerboseSetTargetUpdatePhysicalPathAccessAccount = Successfully updated username for physical path access on ftpSite "{0}".
VerboseSetTargetUpdatedState = Successfully updated State on ftpSite "{0}".
VerboseSetTargetUpdateSslInfo = Successfully updated SslInfo on ftpSite "{0}".
VerboseSetTargetUpdateStartingDataChannelPort = Successfully updated starting data channel port on ftpSite "{0}".
VerboseSetTargetUpdateSuppressDefaultBanner = Successfully updated SuppressDefaultBanner on ftpSite "{0}".
VerboseSetTargetUpdateUserIsolation = Successfully updated UserIsolation on ftpSite "{0}".
VerboseTestTargetFalseAllowLocalDetailedErrors = AllowLocalDetailedErrors for ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalseApplicationPool = Application Pool for ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalseAuthenticationInfo = AuthenticationInfo for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseAuthorizationInfo = AuthorizationInfo for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseBannerMessage = BannerMessage for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseBindingInfo = BindingInfo for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseDirectoryBrowseFlags = DirectoryBrowseFlags for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseEndingDataChannelPort = Ending data channel port for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseEnsure = The Ensure state for ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalseExitMessage = ExitMessage for ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalseExpandVariablesInMessages = ExpandVariablesInMessages for ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalseExternalIPaddress = The external firewall IP address for ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalseGreetingMessage = GreetingMessage for ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalseLogFlags = LogFlags for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseLoglocalTimeRollover = LoglocalTimeRollover for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseLogPath = LogPath for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseLogPeriod = LogPeriod for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseLogTruncateSize = LogTruncateSize for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseMaxClientsMessage = MaxClientsMessage for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseSslInfo = SslInfo for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseStartingDataChannelPort = Starting data channel port for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalseState = The state of ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalseSuppressDefaultBanner = SuppressDefaultBanner for ftpSite "{0}" is not in the desired state.
VerboseTestTargetFalsePhysicalPath = Physical Path of ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalsePhysicalPathAccessPass = Password for physical path access of ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalsePhysicalPathAccessAccount = Username for physical path access of ftpSite "{0}" does not match the desired state.
VerboseTestTargetFalseUserIsolation = UserIsolation for ftpSite "{0}" is not in the desired state.
VerboseTestTargetTrueResult = The target resource is already in the desired state. No action is required.
VerboseTestTargetFalseResult = The target resource is not in the desired state.
VerboseStartWebsite = Successfully started ftpSite "{0}".
VerboseStopWebsite = Successfully stopped ftpSite "{0}".
WarningLogPeriod = LogTruncateSize is specified as an input so LogPeriod input will be ignored and set to "MaxSize" on Website "{0}".
'@
Loading