Jump to content

REST Methods for Modify (and Delete) on Folders/Passwordlists


Fabian Näf

Recommended Posts

Hi All

 

Our company just went live with Passwordstate a week a go. We migrated loads of credentials and a big tree structur from our previous password manager solution to Passwordstate. After we went live, we realized, that we forgot to migrate some certain fields from the old password manager solution from the tree (which should be migrated to folder and passwordliste in Passwordstate).

Currently Passwordstate has no REST method to modify (or delete) folders or passwordlists. So the only option which left was to inject the missing date directly into the database, which is kind of ugly, even though it went well.

 

Therefore I'd like to raise this feature request for modify and delete REST methods for the win and anonymous REST API.

 

Best regards,

 

Fabian

Link to comment
Share on other sites

  • 2 months later...

Hi there!

 

I'm adding to this topic because we have the same issue:

 

I'm currently testing Passwordstate and overall everything is fine and the product suits well to our requirements.

 

My plan is to synchronise an external customer-database with passwordstate by adding a folder for each customer.

The API works well but it's not possible to change some attributes:

* changing name  and description

* changing parent folder (move folder)

* nice would be: getting just one folder by Id (currently not possible)

 

Not having that features would be a show stopper.

 

And by the way: I've added a few functions to Fabians Import-KeePass-XML.ps1 which now supports configurable mapping of keepass' addidional fields to Passwordstate generic Fields, adding not handled fields to the description, UTF8 Ümläüte fixed, and support for files/attachments. Works very smooth now. If anyone is interested i can provide it here

 

 

Kind Regards

Folke

Link to comment
Share on other sites

Hi Folke,

 

Thanks for the feedback. With these suggestions, can you confirm you're wanting to make changes to existing Password Lists and Folders? We haven't really had much in the way of interest in doing this via the API, whereas the creation via the API is used by many customers.

Do you also need this just for the initial data migration, or ongoing? We only ask because we have many feature requests we're working through, and it might be some time before we're able to work on it.

Regards

Click Studios

Link to comment
Share on other sites

Hey Click Studios,

 

 

Thanks for your instant response.

 

Yes, i want to make changes to existing PasswordLists and Folders.

And this is not a one time import job, i want to have a permament one-way synchronosation between a list of our customers and the PasswordFolder in Passwordstate.

 

Kind Regards

 

Link to comment
Share on other sites

Thanks for confirming :)

 

We'll prioritize this for you if we have enough interest from the community - this is the only fair way we can think of for adding one feature request over another, as we have plenty to work through :)

Thanks very much.

Regards

Click Studios

Link to comment
Share on other sites

Hi Folke

 

My final solution (workaround) in this case was to update the guide directly in the database, below some snippets from my Powershell script.

I have to say, that this is very dangerous and can lead to a corrupt database if you're doing something wrong! So be very careful with this!!

 

$global:PasswordstateSystemWideAPIKey = '';

Import-Module SQLPS -DisableNameChecking

Push-Location
cd SQLSERVER:\SQL\localhost\DEFAULT\Databases\passwordstate

Function UpdateGuideOfPasswordstatePasswordlistOrFolder() {
    Param ( 
            [Parameter(Mandatory=$True,ValueFromPipeline=$False,ValueFromPipelinebyPropertyName=$False)]
            [String]$Id,     
            [Parameter(Mandatory=$False,ValueFromPipeline=$False,ValueFromPipelinebyPropertyName=$False)]
            [String]$Guide
    ) 
    Begin { 
        $Guide = ConvertTextToHtml -text $Guide
    }  
    Process { 
        $Header = @{
	        APIKey = $global:PasswordstateSystemWideAPIKey
        }

        try {
            $query = $("UPDATE PasswordLists SET Guide = '" + $Guide + "' WHERE PasswordListID = " + $ID)
            Invoke-Sqlcmd -Query $query
        } catch {
            Write-Host $_ -ForegroundColor Red
            Write-Host $_.GetType() -ForegroundColor Red
            Write-Host $_.Exception -ForegroundColor Red
            throw $_.Exception
        }          
    }
    End {
        Write-Output ($result | Where-Object { $_.TreePath -eq $Tree }).PasswordListID
    }

}

Function ConvertTextToHtml() {
    Param ( 
            [Parameter(Mandatory=$True,ValueFromPipeline=$False,ValueFromPipelinebyPropertyName=$False)]
            [String]$text          
    ) 
 
    Begin {  } 
 
    Process { 
        $html = $($text -replace "\n", "<br>")
    }

    End {
        Write-Output $html
    }
}


$dummyGuide = @"
This
Is
A
Test
Guide
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. 
"@
UpdateGuideOfPasswordstatePasswordlistOrFolder -Id 123456789 -Guide $dummyGuide

Pop-Location

Best regards,

 

Fabian

Link to comment
Share on other sites

2 hours ago, Fabian Näf said:

Hi Folke

 

My final solution (workaround) in this case was to update the guide directly in the database, below some snippets from my Powershell script.

I have to say, that this is very dangerous and can lead to a corrupt database if you're doing something wrong! So be very careful with this!!

 

 

Fabian

 

Grüezi Fabian,

 

many thanks for sharing the script.

 

Meanwhile i've figured out exactly the same way  using MSSQL directly. Sure, it's dangerous, but i tink they will not change the DB-Structure the next releases and maybe i can rewrite my PasswordStateUpdateFolder() function to use the API and not MSSQL a couple of releases later.

 

Grüße in die Schweiz aus München

 

Folke

Link to comment
Share on other sites

22 hours ago, Folke said:

And by the way: I've added a few functions to Fabians Import-KeePass-XML.ps1 which now supports configurable mapping of keepass' addidional fields to Passwordstate generic Fields, adding not handled fields to the description, UTF8 Ümläüte fixed, and support for files/attachments. Works very smooth now. If anyone is interested i can provide it her

 

Ohh, I just realized, that I've overseen your "by the way"!

Sounds very very interesting to me!! I know, that other people already asked for a funktion to upload the attachments as well.

Could you post your updated version in this thread?

 

Grüsse zurück nach München :-)

 

Fabian

Link to comment
Share on other sites

  • 1 year later...
On 7/30/2018 at 1:47 PM, support said:

Thanks for confirming :)

 

We'll prioritize this for you if we have enough interest from the community - this is the only fair way we can think of for adding one feature request over another, as we have plenty to work through :)

Thanks very much.

Regards

Click Studios

Hello,

 

my company is also using multiple instances of your great passwordmanagment solution.

Let's say it clearly, since I'm diving through your WebAPI and fully customizing one of the instances for our needs for our IT-Infrastructures on customer side, I love it!

 

We're building whole production facilities, with a hundrets of IP devices inside, for our customers in turn-key style.

Therfore we're administrating the IT-Infrastructure of hundrets of such facilities around the globe.

That's the reason why we need a complex and secure passwordmanagement.

Therfore I'm writing a alround script at the moment with usage of your WebAPI, have I told that I love your solution?

This script will full auto create Folder, Passwordlist & Host Structures, setup the access rules for different AD Groups around the globe and after, it will fill/let generate all needed Passwords depending to the Hosts.

I need the additional functionality of:

1) At Tab "PASSWORDS": Deleting Folders, PWLists & Documents

2) At Tab "HOSTS": Creating with fillin "Auto Match Criteria" Strings, also Searching & Deleting Folders

This we'll need ongoing, cause if somebody has used the script to map the whole facility and has done an failure or something changed meanwhile, it would be great ... nearly essential, to "re-do" the work with changed values about the facility, within the script and therefore with a single call of it with another flag "-update" or similar.

 

I tell you this because:

Please, please!

Push this Feature-Request higher, much higher ;)

 

Thanks a lot meanwhile for your great work about the solution itself and also the API!

Kind regards,

Elias

 

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

Hey

 

Is there any update on the DELETE methods for the folders and password lists? We have over 6000 lists and lots of folders, when a customer/asset (which relates to specific lists/folders) is 'gone' on our end we'd like to clean-up it's structure.

Does this feature already exist in newer versions our not yet?

 

Kind regards

Jeffrey

Link to comment
Share on other sites

Hello Jeffrey,

 

We do not have any methods in our API for this still sorry.

 

Not sure if it helps, but on the screen Administration -> Password Folders, you can bulk delete a Folder, and all nested Folders and Password Lists.

Regards

Click Studios

Link to comment
Share on other sites

Hey

 

Thanks for the reply. Is there any ETA on these methods? I am really stumped that this is not included yet. Lots of people are doing automatisation these days, removing this manually is not of this time.

Is there some possibility to get this prioritised?

 

Kind regards

Jeffrey

Link to comment
Share on other sites

  • 10 months later...
  • 3 months later...

+1 for the folder\passwordlist modification\delete feature to the API.

Our company is live with Passwordstate for a month now and more and more people are asking for this.

Is there any ETA on this?

 

 

Link to comment
Share on other sites

  • 8 months later...
  • 2 weeks later...

+1

We are using Passwordstate in our company to. The API are nice to populate structure and passwords into Passwordstate.

At the moment we are looking for a way to update and delete folders and password lists for automatic updating and cleaning obsolete data.

Due to security policy we are not allow to manipulate the data in the database, so we need this functionality in Passwordstate.

Link to comment
Share on other sites

  • 2 months later...
  • 5 weeks later...
  • 7 months later...
  • 2 weeks later...
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...